How to set encoding in php.ini file

王林
Release: 2023-03-04 17:54:01
Original
3467 people have browsed it

How to set the encoding in the php.ini file: first open the php.ini configuration file; then find and modify the configuration [default_charset = "GB2312"]; and finally restart the server.

How to set encoding in php.ini file

Settings about the default character set in php.ini

(Recommended tutorial: php graphic tutorial)

default_charset = "utf-8"
mbstring.internal_encoding=utf-8
mbstring.http_output=UTF-8
mbstring.encoding_translation=On
mbstring.func_overload=6
Copy after login

Example:

(Video tutorial recommendation: php video tutorial)

If you want to modify the PHP default character set to GB2312, as follows:

vim php.ini
default_charset = "GB2312"
systemctl restart httpd
Copy after login

The above is the detailed content of How to set encoding in php.ini file. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template