I try to upload large files in my app with php but it doesn't seem to work. It works with little files,
I try to change php attributes in the php.ini file but same issue.
this is my php code :
ini_set('display_errors', 'On');
error_reporting(E_ALL);
ini_set('upload_max_filesize', '100M');
ini_set('post_max_size', '100M');
ini_set('max_input_time', 3000);
ini_set('max_execution_time', 3000);
foreach ($_FILES["file-1"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$name = $_FILES["file-1"]["name"][$key];
$tmp_name = $_FILES["file-1"]["tmp_name"][$key];
if(move_uploaded_file($tmp_name, "../upload/$name")){
echo 'success';
}else {
echo 'error upload';
}
}
else{
echo 'error';
}
}
Result : "error"