CVS: web/include header.php,1.6,1.7
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2002-03-26 22:21:40
|
Update of /cvsroot/phpweather/web/include In directory usw-pr-cvs1:/tmp/cvs-serv11830/include Modified Files: header.php Log Message: And now with character encoding header. The idea is to have the different translations set the $charset variable. The info is already there in the $strings array. Index: header.php =================================================================== RCS file: /cvsroot/phpweather/web/include/header.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- header.php 26 Mar 2002 21:58:25 -0000 1.6 +++ header.php 26 Mar 2002 22:21:37 -0000 1.7 @@ -1,5 +1,13 @@ <?php +/* The page that includes the header should set $charset if it wants + * something else than iso-8859-1: */ +if (empty($charset)) { + header('Content-Type: text/html; charset=iso-8859-1'); +} else { + header("Content-Type: text/html; charset=$charset"); +} + if ($SERVER_NAME == 'gimpster.bolignet-aarhus.dk') { define('ROOT', '/php/phpweather-web'); } else { |