Assassin2684 wrote: |
But everything is back to normal now. Fixed the main site to. Thanks for letting me know about this, I probably wouldn't have noticed.. |
Smong wrote: |
Wouldn't the file permissions have to be execute as well? |
php.net wrote: |
$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted. |
Code: Show/Hide $_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted. |
Code: Show/Hide $allowed_types = array( //Allowed types
"image/gif" => "gif", "image/pjpeg" => "jpg", "image/png" => "png", "image/bmp" => "bmp", "image/jpeg" => "jpg", ); if(!array_key_exists($_FILES['userfile']['type'], $allowed_types)) { // Check the extension if its allowed die(" Invalid file type!</font></center>"); } |