Can anyone suggest a solution to the file upload problem i'm having at the moment. I'm standard HTML forms (with $_FILE) to upload images for a gallery.
Problem - I need to check that the file is actually where before it's added to the database. I'm thinking that I could check the size of the temporary file on the server (after upload) and checking the size. Since a 0 size file is going to be a bogus file.
Any thoughts?
Does a file exist? Or is the user being evil?
Moderator: General Moderators
- ambivalent
- Forum Contributor
- Posts: 173
- Joined: Thu Apr 14, 2005 8:58 pm
- Location: Toronto, ON
Look at is_uploaded_file()
Also, $_FILES['userfile']['size'] can be checked to ensure a value larger than zero.
Also, $_FILES['userfile']['size'] can be checked to ensure a value larger than zero.