note 64485 added to function.echo

From: Date: Sat, 15 Apr 2006 18:33:57 +0000
Subject: note 64485 added to function.echo
Groups: php.notes 
Request: Send a blank email to php-notes+get-108183@lists.php.net to get a copy of this message
If you use: <?xml enc....?> in your pages, you'll probably see that it'll come out with a parse error. That's because it's interpreting it as PHP (because of the <?xml?> blocks, so the workaround, which I use for my site is: <?php echo('<'.'?xml version="1.0" encoding="UTF-8"?'.'>'); ?> When PHP parses the script, it'll put '<' and '?xml vers...' together with '?' and '>'. Then PHP won't parse that as a codeblock, and w3.org likes it :). See it in action (source code) at http://www.tgohome.com/ ---- Server IP: 85.116.0.130 Probable Submitter: 81.86.162.169 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.echo.php Edit -- http://master.php.net/note/edit/64485 Del: integrated -- http://master.php.net/note/delete/64485/integrated Del: useless -- http://master.php.net/note/delete/64485/useless Del: bad code -- http://master.php.net/note/delete/64485/bad+code Del: spam -- http://master.php.net/note/delete/64485/spam Del: non-english -- http://master.php.net/note/delete/64485/non-english Del: in docs -- http://master.php.net/note/delete/64485/in+docs Del: other reasons-- http://master.php.net/note/delete/64485 Reject -- http://master.php.net/note/reject/64485 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#108183) next »