PHP 5.6 comes with the new default charset directive installed on UTF-8 , in some cases this may be a problem for pages served in the meta tag as latin1, you can override this directive by calling ini_set('default_charset', 'iso-8859-1') in your scripts.
To do this, place each php file that you want to encode in Latin 1 at the beginning of your script:
example: index.php
<?php $server_root = realpath($_SERVER["DOCUMENT_ROOT"]); $config_serv = "$server_root/php/config.php"; include("$config_serv"); ?>
Then create a “php” folder under your root site and put this piece of code in config.php :
example: config.php
<?php
If your php.ini is configured to latin1 ( ISO-8859-1 ) and you want to serve the utf-8 (unicode) page, you can force encode using the same method, but instead use iso-8859-1, utf-8. Look at it:
example: config.php
<?php
I hope you find my answer useful, I solved my problem this way!
source share