imagettftext函数中参数必须是utf-8,mb_convert_encoding()函数检查编码确实是utf-8
试了很多方法,下面的起了作用,具体原理不知道,反正管用
$str=mb_convert_encoding('汉字', "html-entities", "utf-8"); //转成html编码
压缩文件夹,文件夹下文件名是中文的话会出现乱码,所以中文文件需采用下面的方法。
//$zip->addFile($path . "/" . $filename,basename($path . "/" . $filename));
$zip->addFromString( iconv('utf-8', 'gbk//ignore', basename(file),file_get_contents($file))