Example:
upload_max_filesize = 2000M
post_max_size = 2006M
memory_limit = 4012M
Key for config:
upload_max_filesize < post_max_size < memory_limit
Simple code to check normal upload:
testup.htm
<html>
<head>
<title>Upload</title>
</head>
<body>
<form id="frmUpload_1" name="frmUpload_1" action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" id="uploadfile_1" name="uploadfile_1" />
<input type="submit" />
</form>
</body>
</html>
upload.php
<?php
foreach ($_FILES as $ele => $file) {
if (move_uploaded_file($_FILES[$ele]["tmp_name"], "/tmp/bla.zip")) {
echo '<script> alert("Uploaded"); </script>';
} else {
echo '<script> alert("Upload failed"); </script>';
}
}
?>
Title:
Config PHP.INI to upload very large file
Description:
Example: upload_max_filesize = 2000M post_max_size = 2006M memory_limit = 4012M Key for config: upload_max_filesize Simple code to check nor...
...
Rating:
4