Jump to content
Sign in to follow this  
~Shinta

xml declaration and php

Recommended Posts

Hi. I've been having a problem converting my site to php. First off, my html files use the xml declaration on all teh pages. When I run it through the php parser it picks up the xml declaration (which ofcourse has has <? in it) and generates an error. I need a way to fix this. I tried to fix it with the ascii code for ?, but then the browser doesn't pick up the declaration tag at all. I want to remain valid xhtml 1.1 and use php. Also, I want to use ssi includes <!--#include--> in php document. It isn't really a big deal, but I want something so my site will still operate during the conversion (when I use the include() object instead.)

Share this post


Link to post
Share on other sites

Either turn off the <? shortcut in your php.ini or do something like this:

<?phpecho '<'.'?xml version="1.0" encoding="utf-8"?'.'>';?>

That should result in <?xml version="1.0" encoding="utf-8"?>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...