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.
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:
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!