- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
Wordpress上传中文附件出现乱码和后台上传中文图片不显示解决方法
编辑wp-admin/includes/file.php这个文件
1、查找:
$new_file = $uploads['path'] . "/$filename";
替换为:
$new_file = $uploads['path'] . "/" . iconv("UTF-8","GB2312",$filename);
注意,之需要替换第一处即可!
2、查找
return apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload' );
修改为:(修正中文文件名编码问题)
return apply_filters( 'wp_handle_upload', array( 'file' => $uploads['path'] . "/$filename", 'url' => $url, 'type' => $type ) , 'upload');
售前咨询
售后咨询
备案咨询
二维码
TOP