ZipArchive 添加压缩包注脚的时候是乱码?文件类型是UTF-8?怎么才能让它不是乱码,下面是代码
<?
$zip = new ZipArchive();
if ($zip->open('d:/aa.zip', ZIPARCHIVE::CREATE) !== TRUE) {
die ("Could not open archive");
}
$zip->addFile("d:/1.txt",basename("bb.psd"));
$zip->setArchiveComment('
欢迎您使用压缩包。。。(这里的中文为乱码,文件为utf-8编码,怎么才能不为乱码呢?)
');
$zip->close();
echo "Archive created successfully.";
?>