windows系统
utf-8 转gbk 并创建中文目录
public function characterToGbk($str)
{
if (!Text::isUTF8($str)) {
$str = utf8_encode($str);
}
return iconv("UTF-8", "GBK//IGNORE", $str);
}
if (!is_dir(self::characterToGbk($dir))) {
mkdir(self::characterToGbk($dir),0777,true);
}