I want to upload the file to my local server, but only small size files worked, if the file size exceeds certain value, then it can not find the uploaded file.
if (isset($_FILES["fileToUpload"]["tmp_name"])) {
$fileUploaded = move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], "./uploads/".$_FILES["fileToUpload"]["name"]);
} else {
die("Error uploading file. Please contact an administrator");
}
Then I changed the upload_max_filesize and post_max_size in php.ini, restart apache, but the problem still exists, couls you help me on that? thanks so much.
update: 1. only one file will be uploaded. 2. Small-size file like less than 2 MB could be uploaded successfully. I tested an 10 MB file, it failed. 3. I changed the two parameters upload_max_filesize and post_max_size from 2 MB to 100 MB.
enctype="multipart/form-data"
? – Rafael