note 33246 deleted from function.filetype by didou
| From: | didou@php.net | Date: | Fri, 20 Jun 2003 09:14:03 +0000 |
| Subject: | note 33246 deleted from function.filetype by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50702@lists.php.net to get a copy of this message | ||
Note Submitter: Ed
----
Heres a method I use to double check that a double extension isnt being used eg(file.exe.php).
<?php
function check(){
$count = explode(".", $file);
return count($count)-1;
}
?>
Then just call the function in a if expression eg.
if(file_is_uploaded($file)&&(check()<="1")){
do this
}
Hope thats of some help.