PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have written some code to upload images on my web site, after testing it with various images I find that it sometimes returns empty values, for example the following code used with . JPG images taken on my Nicon coolpix returns the $file_name, $file_type and $file_temp_name values as being empty and the $file_size returns 0. Other images are not a problem, I even tried running the problem images through Photoshop as jpg and gif but it makes no difference, the image information is not read from these images although Photoshop can read the file size fine.
The code I am using as far as I know is the normal code used with php to read these values which is below:
Can anyone shine any light on what this problem might be?
Weird, if you view the image properties, it's alternative text is:
The image “http://onlinepropertylist.com/DSCN2463.JPG” cannot be displayed, because it contains errors.
OK, It didn't enter my brain that the filesize error related to the permitted file size set in the actual form. I set this size using a "config file" variable and check it against the same in the actual upload script, I had it set at 30000 when it should have been 300000 so the file was in fact too large for my permitted file size.