06-04-2008, 09:49 AM
|
#9 (permalink)
|
|
The Acquainted
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
|
Quote:
Originally Posted by SpYkE112
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.
|
|
|