zip files this is where the weird part comes in
i echo'ed everything and it says everything is a zip (even pdf's and psd files) file when i do this:
Code: Select all
$type = $_FILES['userfile']['type'];
if ($type = 'application/x-zip-compressed'){
//stuff
}
else
{
echo "this file is nozip file <br>";
echo "new upload";
}Code: Select all
$type = $_FILES['userfile']['type'];
if ($type != 'application/x-zip-compressed'){
//stuff
}
else
{
echo "this file is a zip file <br>";
echo "new upload";
}ps: please don't start about the safety and correctness of the $_files
variable. it serves my purpose well enough and my users are a bunch of ignorants
and no one from outside can get into this server