参考文件 https://www.php.cn/blog/detail/1658.html
$path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; // 文件保存命名规则 $saveName = $this->buildSaveName($savename, $autoAppendExt); //http://phpshiti.com/article/110 //https://www.php.cn/blog/detail/1658.html if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $saveName = iconv('utf-8','gb2312//IGNORE', $saveName); }
//调用move()方法后,获取的中文文件名乱码 $info->getSaveName() 解决方法 //https://www.php.cn/blog/detail/1658.html $filename = $info->getSaveName(); $exclePath = iconv("GB2312","UTF-8", $filename);
( [title] => 第三法规库文件1.docx [size] => 7.13 [type] => docx [ext] => .docx [path] => \uploads\statute\第三法规库文件1.docx [role_id] => 8 )