note 33246 added to function.filetype

From: Date: Thu, 19 Jun 2003 23:09:30 +0000
Subject: note 33246 added to function.filetype
Groups: php.notes 
Request: Send a blank email to php-notes+get-50690@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.filetype.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33246 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33246&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33246&report=yes

« previous php.notes (#50690) next »