Home  >  Article  >  Backend Development  >  How to set the name of the php folder in Chinese

How to set the name of the php folder in Chinese

藏色散人
藏色散人Original
2019-09-29 10:30:083286browse

How to set the name of the php folder in Chinese

How to set the php folder name in Chinese?

First of all, it is not recommended to use Chinese file names!

Because Chinese will be sent in URL encoding, although it will be decoded when sent to the server, if it is inconsistent with your encoding, it will not be decoded.

To put it simply, the Chinese in the URL, in common browsers, will be encoded in UTF-8 encoding by default and sent to the server! In the Chinese windows environment server, when decoding the URL, gb2312 encoding is used for decoding, which results in the inability to get the original Chinese text you entered in the address bar!

So it will prompt that the file name cannot be found.

If you must use Chinese, the solution is limited to your local browsing solution

In the browser, open the "Internet Options" menu, select "Advanced", and then find "Send" utf-8 URL", remove the previous hook. Then confirm. Restart the browser. In this way, the Chinese in the address bar will be sent in gb2312 encoding by default, so that the server can correctly find the file with the Chinese file name.

For more PHP related knowledge, please visit PHP Tutorial!

The above is the detailed content of How to set the name of the php folder in Chinese. 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
Previous article:Is php dynamic or static?Next article:Is php dynamic or static?