编码问题

var_dump(file_exists(iconv('UTF-8', 'GBK', './中文文件名.txt')));//代码中 路径中存在中文,编码的转换

 

$fileinfo['name'] = iconv('gbk', 'utf-8', $file);//目录文件名编码问题:展示时,将操作系统编码转换为响应数据编码。
        // Windows gbk,项目utf-8,将从Windows拿到的文件转为项目的utf8

 

posted on 2017-07-16 17:16  huodaihao  阅读(66)  评论(0编辑  收藏  举报

导航