Home > Backend Development > PHP Tutorial > 中文名字的图片上传异常怎么处理

中文名字的图片上传异常怎么处理

WBOY
Release: 2016-06-13 13:41:57
Original
1051 people have browsed it

中文名字的图片上传错误怎么办?
比如:中国.jpg 上传就会错误 改成英文的就没有问题 这种情况该怎么处理?谢谢!

------解决方案--------------------
啥错误?
------解决方案--------------------
还得老实点,只用英文,不然英文系统就识别不了你的图片了。
------解决方案--------------------
中文字符编码...上传图片的文件名问题我记得问过好多次了。自己核对一下
------解决方案--------------------
应该是文件名编码的问题,你可以试试;
move_uploaded_file(iconv('gb2312','utf-8',$_FILES['upload_file']['tmp_name']),$store_dir.$upload_file_name)

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template