RE: upload large files troubles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux