localhost에서 Uploadify를 사용하여 사용자가 파일을 업로드 할 수있는 사이트를 개발하고 있습니다. 지금까지 모든 것이 잘 작동하지만, Uploadify는 ~ 25MB가 넘는 파일 업로드를 거부합니다.Uploadify가 ~ 25MB 이후로 업로드되지 않습니다.
나는 업로드 상태를보고이 기능을 사용하고 있습니다 :
function updateProgress(file, bytesUploaded, bytesTotal, totalBytesUploaded, totalBytesTotal) {
var percent = totalBytesUploaded/totalBytesTotal * 100;
$('.bar').css('width', percent + '%');
console.log(percent +' ' + bytesUploaded);
}
내가 그 위의 모든 파일을 잘 작동하고 업로드가 바로 중지 크기 25메가바이트 아래의 모든 파일을 업로드하려고합니다. 오류 또는 아무것도 없습니다.
이
내 관련php.ini
설정은 다음과 같습니다
post_max_size = 1024M
upload_max_filesize = 1000M
memory_limit = 1024M
그리고 나는 그들이 phpinfo()
을 사용하여 올바른지 확인했습니다. 내 업로드 스크립트입니다 :
<?php
$targetFolder = '/uploads'; // Relative to the root
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;
$targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];
$fileParts = pathinfo($_FILES['Filedata']['name']);
move_uploaded_file($tempFile,$targetFile);
echo '1';
}
?>
내가 여기에서 놓친 것이 있습니까? 아마 아파치 설정 설정? Uploadify 문서는이 오류에 도움이되지 않았기 때문에 Google을 통해 아무것도 찾을 수 없습니다.
감사합니다.
당신의'max_execution_time'은 무엇입니까? – MetalFrog
30 초이지만 사이트가 localhost에있는 것처럼 보이며 기본적으로 업로드가 지나치지 않는 파일을 복사하는 것입니다. 실제로 업로드가 시작된 후 1 초 이내에 업로드가 중지됩니다. –