Php validate image error message
I am using the below script to validate if the uploaded files are png or jpeg but getting error message. please help.
The error message
echo "error: 'This is no photo..'\n";
Warning: exif_imagetype() [function.exif-imagetype]: Filename cannot be empty in test.php on line 52
Assuming line 52 is the first line you showed us, then it would appear that $_FILES[$photo]['name'] is either not set or has an empty value; so you need to figure out why that is (misspelling, or $photo has an unexpected/incorrect value, etc.?).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)