Re: Dreamweaver, PHP and XHTML compliance

From: Pedro Graca (hexkid_at_dodgeit.com)
Date: 12/13/04


Date: 13 Dec 2004 15:05:05 GMT

Captain Nemo wrote:
> However, this won't work in PHP, because as soon as it sees the '<?' it
> assumes that what follows is php code (and crashes).
>
> It's simple enough to add the line:
>
> <?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"; ?>
>
> at the top of your PHP pages, but then it won't work in plain HTML, so it
> can't go in the template. What we need is version 1 of the line in HTML
> docs and version 2 in PHP docs.
>
> Does anyone know the answer to this problem?

You could try "short_open_tag = off"
    http://www.php.net/manual/en/ini.sect.language-options.php#ini.short-open-tag

-- 
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!


Relevant Pages

  • Re: form action to same file opens new window
    ... I am using a really terrible and out of date book as a guide ... AFAIK for plain HTML there isn't a difference between single and double ... As far as PHP is concerned using one or the other determines (amongst ... I tend to use single quotes ...
    (comp.lang.php)
  • Re: sub-menus
    ... you suggest reloading the page with the new menu with ... the sub-options displayed in plain html (doing so with php to make the ... Prev by Date: ...
    (comp.infosystems.www.authoring.html)
  • Re: Speed :: XML vs. Database
    ... since no hard drive work will be involved. ... Could you clarify the above statement or perhaps provide a link to a ... I have always used just plain HTML for my ... PHP and MySQL with the thought of eventually migrating my "plain Jane" ...
    (comp.lang.php)
  • Re: Head scratcher
    ... When I tested php using phpinfo it works fine. ... it to the error file when I call the page. ... Yes plain html shows up just fine. ... the phpinfo test works just fine. ...
    (comp.lang.php)
  • Re: PHP/PEAR
    ... maintained extensions in PEAR. ... Is this happening on every PHP page? ... If it happening on every plain HTML ... If so I'd guess Apache or similar is doing DNS lookups. ...
    (php.general)