Upload of bigger files
Posted: Tue Sep 16, 2003 12:20 pm
I have a file upload script which works fine with smaller files but when I try to upload some bigger files it fails. and I mean as a smaller files some less than one MB files and with big I mean about 10MB files. here's the code:
can someone please tell me what's wrong with that if you know.
Code: Select all
if($submit)
{
$uploaddir = '../files/';
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{
echo "<script>alert('the file upload completed succesfully');</script>";
redirect('files_add.php?filename='.$_FILES['userfile']['name']);
}
else
{
echo "<script>alert('the file upload did NOT succeeded');history.go(-1);</script>";
}
}
else
{
echo "
<br>
<form action="files_upload.php" method="post" enctype="multipart/form-data">
<table width="75%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
This is the first step of file adding process. In this step you will upload your file into our webhost.
Do not add any material which has copyright or violates any
laws. Do not also add large files (tens of MBs) without the agreement of clan leader.<br><br>
</td>
</tr>
<tr>
<td>
<input type="file" name="userfile">
<input type="hidden" name="MAX_FILE_SIZE" value="200000000">
<input type="submit" value="upload the file" name="submit">
</td>
</tr>
</table>
</form>
";
}