Uploading Script

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

Post Reply
Tempest
Forum Newbie
Posts: 10
Joined: Sat Jan 08, 2005 12:33 pm

Uploading Script

Post 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;
Post Reply