Reply to How to change HTTP headers

Your name:

Reply:


Posted by thomas Armstrong on 10/15/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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация