Problem with uploading large files - over 2mg
Posted: Fri Jun 06, 2003 2:00 pm
I need to have files uploaded upto say 20Mg. I have put this small test script together to simplify, and to try and solve this problem.
The test files I have been using are 4-6Mg... all other files, >2Mg work fine.
Any suggestions?
----------------------------------------------
<?php ini_set('upload_max_filesize','20M'); ?>
<html>
<head>
<body>
<form enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="20000000">
File: <input name="userfile" type="file" /><br />
<input type="submit" value="Upload" />
</form>
<?php
if (@is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
copy($_FILES["userfile"]["tmp_name"], "files/" . $_FILES["userfile"]["name"]);
echo "<p>File uploaded successfully.</p>";
}
?>
</body></html>
-----------------------------------
Thanks,
James
The test files I have been using are 4-6Mg... all other files, >2Mg work fine.
Any suggestions?
----------------------------------------------
<?php ini_set('upload_max_filesize','20M'); ?>
<html>
<head>
<body>
<form enctype="multipart/form-data" action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="20000000">
File: <input name="userfile" type="file" /><br />
<input type="submit" value="Upload" />
</form>
<?php
if (@is_uploaded_file($_FILES["userfile"]["tmp_name"])) {
copy($_FILES["userfile"]["tmp_name"], "files/" . $_FILES["userfile"]["name"]);
echo "<p>File uploaded successfully.</p>";
}
?>
</body></html>
-----------------------------------
Thanks,
James