Re: Rejecting File Upload
| From: | Steve Edberg | Date: | Sun, 05 Aug 2007 05:14:14 +0000 |
| Subject: | Re: Rejecting File Upload | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260199@lists.php.net to get a copy of this message | ||
At 11:48 AM +0700 8/5/07, php mail wrote:
Hi All, How do I prior check file's size in server side before the upload process begin ? Regards, FerisIf you want file information for a file on the *server*, see http://www.php.net/manual/en/ref.filesystem.php If you want file size information *before the upload begins*, that would be on the client side. There's no foolproof or general way to check file information on the client. I don't think you can do it with JavaScript; you might be able to do it on a Windows PC with VBScript, and Java could do it. PHP can refuse to accept files larger than a specified size, which isn't exactly what you're asking: http://us.php.net/manual/en/features.file-upload.php For more information, documentation sets in multiple languages are available here: http://www.php.net/docs.php -steve -- +--------------- my people are the people of the dessert, ---------------+ | Steve Edberg http://pgfsun.ucdavis.edu/ | | UC Davis Genome Center sbedberg@ucdavis.edu | | Bioinformatics programming/database/sysadmin (530)754-9127 | +---------------- said t e lawrence, picking up his fork ----------------+