At 4:46 PM -0500 4/28/07, Edward Vermillion wrote:
On Apr 28, 2007, at 12:21 PM, tedd wrote:
At 9:22 AM -0500 4/28/07, Edward Vermillion wrote:
It should, but instead try this:
$image_size = getimagesize($filename);
echo $image_size['mime'];
$image_size['mime'] ? Where did that come from?
I duno, maybe the manual.
http://us2.php.net/getimagesize <-- 5th or 6th example down.
Ahhh... that's for sending a mime type to the browser.
Ahhh no, it's just a way to get contents of the file.
If you really want to study this, try opening every different image
file (gif, jpg, png, etc.) you have on your desktop and examine each
of the header files via a HEX editor. You will find that every file
has an id of some type in it's header.
The php functions that provide data about files, do just that. They
inspect the header of the file and report what they have found. How
you use them, is your business.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php