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 a script that determines a file type and then it thumbnails the photo depending on the image type. Now all of my code is correct and works because on another server I use the exact same code and it works fine.
I get this error when using the exif_imagetype() function on this server:
Fatal error: Call to undefined function: exif_imagetype() in /home/caposcom/public_html/test.php on line 2
I tested to see if exif_imagetype() was the was the function causing the error above by using this code in a test file that nothing else in it but this code:
that will return the exstension .gif .jpg .jpeg .tif etc
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
scrotaye wrote:if you just need to check extensions and you're not worried about malicious file uploads
depends on the purpose. if it's an admin section and he's going to be the only one uploading, then it wouldn't be a problem
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
that will return the exstension .gif .jpg .jpeg .tif etc
The $_FILES array also gives you the MIME type .. easier than mucking about with the name. Though you need to remember FF and IE report different MIME types for certain images.
that will return the exstension .gif .jpg .jpeg .tif etc
The $_FILES array also gives you the MIME type .. easier than mucking about with the name. Though you need to remember FF and IE report different MIME types for certain images.
Does FF and IE report different MIME types for JPEG or GIF? because those are the only file types I am allowing to be uploaded.
The only file types allowed to be uploaded are JPEG or GIF so thats all I check for, if the file is not JPEG or GIF I send an error message saying NOT PROPER FILE TYPE.
And how do I use $_FILES[""] to pull out the MIME types?