Hi,
I'm using the below script to upload files to my server. Small files work fine, large files fail.
I have tested it with a 6.5 Mb zip-file and a 20 Mb txt-file.
I'm guessing there maybe is some setting in the php.ini that sets a limit to file upload sizes, however I've tried playing with the post_max_size and upload_max_filesize without success...
Anyone got a clue?
<?php
$uploaddir = 'upload/';
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
print "File was successfully uploaded. ";
print_r($_FILES);
} else {
print "Error uploading file!\n";
print_r($_FILES);
}
print "</pre>";
?>