PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Tempest
Forum Newbie
Posts: 10 Joined: Sat Jan 08, 2005 12:33 pm
Post
by Tempest » Sun Jan 09, 2005 12:42 pm
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
<form action="notepad.php?upload=$filename" enctype="multipart/form-data" method="post">
Upload file:
<input type="file" name="filename">
<p>
<input type="submit" value="Upload file">
</form>
rehfeld
Forum Regular
Posts: 741 Joined: Mon Oct 18, 2004 8:14 pm
Post
by rehfeld » Mon Jan 10, 2005 8:02 pm
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.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jan 10, 2005 10:04 pm
might also want to verify that the post size limit in the php.ini was also upped..