Quantcast
Channel: Сообщество PHP DevelStudio - среда разработки программ
Viewing all articles
Browse latest Browse all 6336

Проблема с Zip архивом (с русскими символами)

$
0
0
PHP код:

$dlg c("openDlg1")->execute();
if(
$dlg){
$arhiv c("openDlg1")->fileName;

$path winLocalPath(CSIDL_APPDATA);
$rand md5(rand(1,100000000));
$root "$path/ZIP_OPEN/$rand";
$zip = new ZipArchive();

if (
$zip->open($arhiv) === true) {
$zip->extractTo($root);
dir_search($root$files""truetrue);

c("listBox1")->text $files;
foreach(
$files as $i=>$file){
  
$files[$i] = baseName($file);
}
c("listBox2")->text $files;
}


Куда вставить $filename = iconv('windows-1251', 'cp866', $filename); чтобы файлы с русскими именами извлекались с нормальными именами, а не закорючками???

Viewing all articles
Browse latest Browse all 6336


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>