Posted by thomas Armstrong on 09/29/17 11:27
Hi.
I want to change HTTP headers to insert PHP command:
header("Content-type: text/html; charset=utf-8");
I created this PHP function:
-----------
function smartyHeader()
{
header("Content-type: text/html; charset=utf-8");
}//getZone
------------
Registered it (on my 'config.php'):
--------
$template->register_function("phpHeader", "smartyHeader");
----------
And used it (at the very first line of my 'index.tpl'):
-------
{phpHeader}
------
But when analyzing my HTTP headers, I get:
--------
* Content-Type = text/html; charset=ISO-8859-1
--------
What am I doing wrong? Thank you very much.
Navigation:
[Reply to this message]
|