Page 1 of 1

Uploading Script

Posted: Sun Jan 09, 2005 9:53 am
by Tempest
I don't get a error but it won't let me upload big files. and my php.ini file is set to upload 32M files

my code is

Code: Select all

if (isset($upload)) {
if ($HTTP_POST_FILES['filename']['size'] <= 0)
{
print "There was an error uploading your file.<Br>";
print "Go $url";
exit();
} else {
copy($HTTP_POST_FILES['filename']['tmp_name'],
$HTTP_POST_FILES['filename']['name']);

print "Your file have been sucsessfully uploaded.<br>";
print "Go $url";
exit();

}}
and my html is

Code: Select all

&lt;form action="notepad.php?upload=$filename" enctype="multipart/form-data" method="post"&gt;
Upload file:


&lt;input type="file" name="filename"&gt;
&lt;p&gt;

&lt;input type="submit" value="Upload file"&gt;
&lt;/form&gt;