Home >Backend Development >PHP Problem >How to set default encoding in php.ini

How to set default encoding in php.ini

青灯夜游
青灯夜游Original
2021-05-10 18:00:302082browse

How to set the default encoding in php.ini: 1. In the PHP installation path, find and open the php.ini configuration file; 2. Find the "default_charset" item and modify the value of the item to the required Encoding method, such as "UTF-8", and then save the file; 3. Restart the service.

How to set default encoding in php.ini

The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

The first step is to find the installation path of PHP. Find the php.ini file and open it.

The second step, find default_charset = 'GBK', change it to default_charset = 'UTF-8', save it as follows:

How to set default encoding in php.ini

The third step, Just restart the service.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to set default encoding in php.ini. 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