How can I handle an image Upload exception with a Chinese name?
Source: Internet
Author: User
What if an image with a Chinese name is uploaded incorrectly? For example, if a Chinese .jpg file is uploaded and an error is changed to English, no problem occurs. how can this problem be solved? Thank you !, What's wrong ?, Be honest, use only English, or the English system won't be able to recognize your pictures ., The question of the file name of the uploaded image is as follows. Check the file name encoding. what should I do if an image with a Chinese name is uploaded incorrectly?
For example, if a Chinese .jpg file is uploaded and an error is changed to English, no problem occurs. how can this problem be solved? Thank you!
------ Solution --------------------
What's wrong?
------ Solution --------------------
Be honest and use only English. Otherwise, your pictures will not be recognized by the English system.
------ Solution --------------------
The question of the file name of the uploaded image is as follows. Check it by yourself
------ Solution --------------------
It should be about file name encoding. you can try it;
Move_uploaded_file (iconv ('gb2312', 'utf-8', $ _ FILES ['upload _ file'] ['tmp _ name']), $ store_dir. $ upload_file_name)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service