Can someone please fill the gap in this condition to ensure that users are only able to upload .zip files via my script? I could only find solutions for uploading images.
[code] if ($_FILES[“file”][“size”] < 3145728 && $_FILES[“file”][“type”]== _________){
It's a good question... I can only guess that over time, there has been a need to differentiate between one and the other, i.e. open WinZip automatically as opposed to just downloading the file. But don't quote me...
This is the official MIME site, but you better sit down first...
@aatwoauthorJan 08.2007 βΒ #Using that method or the echo method, irregardless of what type of file I upload the output is always blank (except for the horizontal rule of course). I'm very confused. The file type must contain a value :s
@NightShift58Jan 08.2007 βΒ #It was a typing mistake. Should've been this:[code=php]print "<pre>"; print_r($_FILE); print"</pre>[/code]Can you post the output?
@NightShift58Jan 08.2007 βΒ #Sorry... blew it again...[code=php]print "<pre>"; print_r($_FILES); print"</pre>";[/code]This time, missed the "S" in $_FILES.
@aatwoauthorJan 08.2007 βΒ #I just noticed that after you corrected yourself. Thanks alot. I'll go re-test it and come back with hugs and kisses if it works ?