이 코드는 압축 파일의 파일 이름 (영어의 경우는 히브리어)을 제외하고 원하는 파일로 ZIP 파일을 만들기 위해 제대로 작동합니다. 알맞은 히브리 문자 대신에 이상한 문자들. PHP ZipArchive 영어가 아닌 파일 이름이 아카이브 내에서 펑키 한 파일 이름을 반환합니다.
<?php
$filesfordown = $_POST['GEMin'];
if(empty($filesfordown))
{
echo "No files were seleceted for download.";
}
else
{
$zip_name = "RMW." . time() . ".zip";
$zip = new ZipArchive;
$zip->open($zip_name, ZipArchive::CREATE);
foreach ($filesfordown as $filefordown) {
$zip->addFile($filefordown);
}
$zip->close(); }
header('Content-Type: application/zip');
header("Content-disposition: attachment; filename='$zip_name'");
header('Content-Length: ' . filesize($zip_name));
readfile($zip_name);
ob_flush;
?>
나는 몇 가지가 그의 iconv, setlocalte, 또는 mb_convert_encoding 도움이 될 것 같습니다, 주변 검색,하지만 무엇이든 내가 작동하지 않았다 시도했다.
아이디어가 있으십니까?
P. 측면 질문으로, 지퍼에 디렉토리 구조를 유지하지 않는 방법이 있습니까?
ETA :. $_post
의 예는 www.domain.com/path/ 할 수있다 שלום_01 MP3
이 보인다. PHP? id = 53948 – Daniel