Page 1 of 1

Upload Form

Posted: Sun Jan 09, 2005 12:42 pm
by Tempest
I don't get an error but my script doesn't let me upload files that are like over 1 meg and i have my php.ini file set to 32M uploads alowed my script 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();

}}


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;

Posted: Mon Jan 10, 2005 8:02 pm
by rehfeld
have you restarted the web server since you made the changes to php.ini?


also, the webserver itself can have max upload/request values. you may need to increase those as well.

Posted: Mon Jan 10, 2005 10:04 pm
by feyd
might also want to verify that the post size limit in the php.ini was also upped..