ini_set('mbstring.internal_encoding','UTF-8')
这在 php 文件的开头代表什么以及它的用途是什么?
我知道有一本 php 手册,但它没有用普通人的语言进行解释。
最佳答案
它将默认的内部字符编码定义为UTF-8字符集类型。
这用于通过更改 mbstring.internal_encoding
值来使网站成为多语言网站。
encoding is the character encoding name used for the HTTP input character encoding conversion, HTTP output character encoding conversion, and the default character encoding for string functions defined by the mbstring module. You should notice that the internal encoding is totally different from the one for multibyte regex.
UTF-8(8位Unicode转换格式)是Unicode的可变长度字符编码。
您可以使用 iso-8859-1
、UTF-8
等更改它。
这里是 Unicode character list 的列表.
关于php - ini_set ('mbstring.internal_encoding' ,'UTF-8' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17919441/