upload file size

From: Date: Fri, 14 Nov 2003 17:48:03 +0000
Subject: upload file size
Groups: php.general 
Request: Send a blank email to php-general+get-169661@lists.php.net to get a copy of this message
Hi i really need help with an upload script. right now i use if ($HTTP_POST_FILES['userfile']['size']>$maxsize) { echo "File too big"; exit; } to determine if the file is larger than allowed. but the problem is, that if the file IS larger, it is still first fully uploaded and then checked. i tested it several times - if the file is much larger than allowed, it displays the error message but the page loads a lot longer and my computer is sending the file to the server. this could really kill my bandwidth. is there a way to check the file size without fully uploading the file? thanks joe

« previous php.general (#169661) next »