Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Get image file type

images php coding issues or problems here.

Moderators: macek, egami, gesf

Get image file type

Postby WoozyDuck » Sat Jan 22, 2005 4:24 am

Hi

I was wondering if
Code: Select all
$_FILES['submitFile']['type']

returns the actual file type or it just returns
the file type depend on the file EXTENSION?
cause I have a submit system which recognize
file type using that command and once Ive seen
an user submitted a BITMAP file but with the
extension of JPEG.
It was a JOEG file but $_FILES['submitFile']['type'] recognize
it as BITMAP!

so actuslly how can we get a real file type?
User avatar
WoozyDuck
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed May 05, 2004 10:14 am

Postby ruturajv » Mon Jan 24, 2005 7:28 pm

probably you are looking for
mime_content_type
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby WoozyDuck » Tue Jan 25, 2005 5:39 am

Cheers
Btw do snakes eat ducks? :-o
User avatar
WoozyDuck
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed May 05, 2004 10:14 am


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.