[30750] trunk/www/includes/common.inc

Ryan Schmidt ryandesign at macports.org
Tue Nov 6 10:58:16 PST 2007


On Nov 5, 2007, at 23:18, source_changes at macosforge.org wrote:

> Revision: 30750
>           http://trac.macosforge.org/projects/macports/changeset/30750
> Author:   jmpp at macports.org
> Date:     2007-11-05 21:18:07 -0800 (Mon, 05 Nov 2007)
>
> Log Message:
> -----------
>
> Add a long-ago-suggested-by-Ryan header() to field to includes/ 
> common.inc to force serving of all our webpages as application/xhtml 
> +xml documents

I did? Gosh, I'm forgetful.

> (Ryan, any reason why you orginally suggested "'(...) charset=' .  
> $encoding" rather than plain "'(...) charset=$encoding'"?)

My personal PHP code style is to avoid putting variables inside  
double-quoted strings. In fact I try to avoid double-quoted strings  
in general, favoring single-quoted strings where possible. But feel  
free to use whatever style gives you the most joy. :)

> Modified Paths:
> --------------
>     trunk/www/includes/common.inc
>
> Modified: trunk/www/includes/common.inc
> ===================================================================
> --- trunk/www/includes/common.inc	2007-11-06 05:11:45 UTC (rev 30749)
> +++ trunk/www/includes/common.inc	2007-11-06 05:18:07 UTC (rev 30750)
> @@ -43,6 +43,7 @@
>  # Page header
>  function print_header($title, $encoding) {
>      global $MPWEB;
> +    header("Content-Type: application/xhtml+xml; charset=$encoding");
>      echo "<?xml version=\"1.0\" encoding=\"$encoding\"?>\n";
>  ?>
>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http:// 
> www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">



More information about the macports-dev mailing list