Jump to content

File upload fails for large files.


poleposters

Recommended Posts

Hi,

 

I have a pretty simple upload form.

 

I haven't set an upload limit yet it fails for files ofa certain size?

 

Is there something wrong with the script or my configuration?

 

<?php
if(isset($_POST['Submit']))
{
if ($_FILES['picThumbnail']['name'] != "")
{	$name1="super";
   
	$sUploadDir = 'uploadartwork/';
	$sUploadedFile = $sUploadDir . basename($_FILES['picThumbnail']['name']);
	if (move_uploaded_file($_FILES['picThumbnail']['tmp_name'], $sUploadedFile))
	{
	$sThumbnail = $_FILES['picThumbnail']['name'];
				$sThumbnail = $name1."_".$sThumbnail;
				$sFileName = strtolower(($sThumbnail));
				if (file_exists(($sUploadDir.$_FILES['picThumbnail']['name'])))
					rename(($sUploadDir.$_FILES['picThumbnail']['name']), ($sUploadDir.$sFileName));
	echo "file uploaded successfully";
	}
}
phpinfo();}?>

<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="uploadartwork.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><strong>Single File Upload </strong></td>
</tr>
<tr>
<td>Select file
<input name="picThumbnail" type="file" id="ufile" size="50" /></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Upload" /></td>
</tr>
</table>
</td>
</form>
</tr>
</table>

Link to comment
https://forums.phpfreaks.com/topic/129561-file-upload-fails-for-large-files/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.