php 压缩解压ZipArchive设置注脚(注释)setArchiveComment方法乱码
windows下尽管文件类型是UTF-8格式
头部也设置了header(‘Content-Type: text/html; charset=UTF-8’);
在生成zip文件时候,设置的zip注脚时候总是乱码,代码如下
header('Content-Type: text/html; charset=UTF-8');
$zip = new ZipArchive;
$res = $zip->open('test.zip', ZipArchive::CREATE);
if ($res === TRUE)
原创
2021-08-06 18:19:35 ·
298 阅读 ·
0 评论