Hi,
I'm using a form to upload images that are used in a PDF. I'm allowing GIF's and JPEGS. I'm detecting the file type via: $_FILES['userfile']['type'] - GIF's are fine and work when I upload 72 dpi or 300 dpi, however jpegs are only detected when they are 72 dpi???? Weird! The server is a Win2K with PHP 4.3 and apache 2.
Any help would be fab
Many thanks
Kevin
quick file upload question
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I wouldn't suggest using the type field. It's supplied by the user-agent and is easily faked. getimagesize() may be of interest. The version of PHP you're using may have issues interrogating some badly written jpeg files however, so you may need to upgrade PHP or GD depending on your compatibility and flexibility.