Jump to content

restricton on file upload type...


aradhya

Recommended Posts

Upload your exe file, then when move uploaded file use echo to get format of exe file:echo $_FILES['file']['type'];And then use:if ($_FILES["file"]["type"] == "that_result") {I don't know what is format of it.Example: for jpeg images is image/jpeg

Link to comment
Share on other sites

function notAllowedExtension(){ $fnme = strtolower($_FILES['file']['name']); $backlist = array('php', 'php3', 'php4', 'phtml','exe'); $ext = substr(strrchr($fnme, '.'), 1); echo" <script type='text/javascript'> alert('Invalid file:executable files are not allowed!'); </script> ";return(in_array($ext, $backlist));}got it...thnx for da help nevayz...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...