zahidprimex Posted August 1, 2008 Share Posted August 1, 2008 I am trying to upload files with php by this code in localhost <?phpif ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; }else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } ?> It works well with small file but when I try to upload large file it fails.Whats problem? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 1, 2008 Share Posted August 1, 2008 There are file size limits that you can set. Check to see what $_FILES['file']['error'] is if it fails (you aren't printing any error messages if it fails, you're only checking if it worked). This is the list of error codes:http://www.php.net/manual/en/features.file-upload.errors.php Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.