thinkPHP 上传文件的中文乱码

最新版本~用了里面的上传文件类,发现在保存文件原本名称的时候当有中文名的时候保存文件会显示乱码,看了下源代码发现在Tp上传驱动那里有点问题。

   // if (!move_uploaded_file($file['tmp_name'], $filename)) {
        if (!move_uploaded_file($file['tmp_name'], iconv('utf-8','gb2312',$filename))){ 
            $this->error = '文件上传保存错误!';
            return false;
        }

 

posted @ 2017-03-21 10:57  侠岚之弋痕夕  阅读(1851)  评论(0)    收藏  举报
Where is the starting point, we don't have a choice, but the destination where we can pursue!