- Code: Select all
$allowed_driver_extensions = array("zip","rar","7z","iso","bin","arj","lha","lzh");
And we check the extension thusly:
- Code: Select all
$drvext = substr($_FILES["driverfile"]["name"],strripos($_FILES["driverfile"]["name"],".")+1);
So it should look for the rightmost "." and get all the characters the right of it.
But I think I found the problem. There are two settings in php.ini that affect upload size.
upload_max_filesize and post_max_size.
upload_max_filesize is enforced by the host, and is hardwired to 32MB. post_max_size can be set by me, and was only set to 8MB by default. *facepalm*
Give it another go now, guys.
As far as limiting the filesize before you upload, that can be arranged, but the method might not work on older browsers. I'll do my best to make it as compatible as possible though!