Home  >  Article  >  Backend Development  >  What to do if the Chinese file name in php is garbled

What to do if the Chinese file name in php is garbled

藏色散人
藏色散人Original
2020-08-13 09:49:342060browse

Solution to garbled Chinese file names in php: First open the corresponding PHP file; then use the "$ifilename = iconv('UTF-8', 'GB18030', $filename);" method to convert the encoding .

What to do if the Chinese file name in php is garbled

Recommended: "PHP Video Tutorial"

PHP generates garbled Chinese file names

Use iconv to convert

$ifilename = iconv('UTF-8', 'GB18030', $filename);

The above is the detailed content of What to do if the Chinese file name in php is garbled. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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