PHP 5.6 upgrade and special characters

前端 未结 4 991
你的背包
你的背包 2021-01-12 09:28

I have a website where I\'ve used php to include sections rather than having code be duplicated for each page.
However, recently my webhost upgraded the PHP to 5.6, and

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 10:16

    I had the same problem after upgrading from php 5.5. to 5.6.

    Solved it by setting the default_charset to an empty string in my script:

    ini_set("default_charset", "");
    

    Or if you have acceess to php.ini you can set default_charset = "" instead.

    More info: https://www.saotn.org/php-56-default_charset-change-may-break-html-output/

提交回复
热议问题