This article at the same time solve two problems is PHP require and include reference URL and PHP file encoding conversion function problem, the need for friends can see Ha, refer to.
PHP Configuration "allow_url_fopen" This option is open, you can use the URL as an include or require parameters.
As well as Allow_url related parameters, refer to php.ini for details.
Converting an entire page
This method applies to all coding environments. In this way, the character set of the first 128 characters (display character) is used in NCR (Numeric character reference, such as "kanji" will be converted to "Chinese characters" this form), so that the code in any encoding environment, the page can display normally.
Another question:
This method applies to all coding environments. In this way, the character set of the first 128 characters (display character) is used in NCR (Numeric character reference, such as "kanji" will be converted to "Chinese characters" this form), so that the code in any encoding environment, the page can display normally.
Add the following three lines of code to the header of the PHP file:
The code is as follows |
Copy Code |
Mb_internal_encoding ("gb2312"); The gb2312 here is the original code of your website. Mb_http_output ("Html-entities"); Ob_start (' Mb_output_handler ');
|
Use the Mb_convert_encoding function to enable the PHP mbstring (multi-byte string) extension.
If there is no mbstring extension for PHP, you need to do the following
http://www.bkjia.com/PHPjc/632249.html www.bkjia.com true http://www.bkjia.com/PHPjc/632249.html techarticle This article at the same time solve two problems is PHP require and include reference URL and PHP file encoding conversion function problem, the need for friends can see Ha, refer to. PHP configuration in the Al ...