...

View Full Version : Restricting uploads to zip



aatwo
01-07-2007, 10:20 PM
Hi. I'm writing a file upload script and I want to restrict users to be able to only upload zip files.



What is the condition I would need to add to this IF statement? I've looked around the web but I can only find solutions for uploading images.



if ($_FILES["file"]["size"] < 3145728) && ____________________ {
my code
}

aatwo
01-07-2007, 11:19 PM
Wait this is a PHP question... I have no idea why I asked it here.

haveacigar
01-07-2007, 11:35 PM
ummmmm....



($_FILES["file"]["type"] == "application/zip")



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum