RE: [PHP] upload large files troubles

From: Date: Fri, 19 Aug 2005 13:36:42 +0000
Subject: RE: [PHP] upload large files troubles
Groups: php.general 
Request: Send a blank email to php-general+get-220949@lists.php.net to get a copy of this message
MAKE SURE TO HIT REPLY-ALL SO THAT THE MESSAGE GETS BACK TO THE LIST [snip] The code is pretty simple, i do not think, problem is bad syntax, as I said, everything works fine, when files are smaller then 160 MB. Larger files = blank page. <?php if(isset($_FILES['f'])) { copy ($_FILES['f']['tmp_name'], "Uploaded filez/" . $_FILES['f']['name']) or die ('Could not upload'); echo "File: " . $_FILES['f']['name']. " uploaded!"; echo "<p><a href='./index.html'>Back to upload</a>"; } else echo "Go away!"; ?> [/snip] You need to read the manual on file uploads and use move_uploaded_file() instead of copy... http://www.php.net/move_uploaded_file

« previous php.general (#220949) next »