View Single Post
Old 06-04-2008, 09:49 AM   #9 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

Quote:
Originally Posted by SpYkE112 View Post
You could do like this as an alternative, but it is stupid to rely on mime types and extentions.

But:
PHP Code:
<?php
$myFile 
'/path/to/my.file';

$ext end(explode('.'$myFile));

echo(
$ext);

// Outputs: file
// Or it should ;)
?>

What should you use to determine the file type if you dont use mime types and file extensions?

I've been having some problems creating a secure, image only file upload script. Sometimes it decides the mime type of a jpg file isn't acceptable.
__________________
Free CSS Tutorials
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote