Guardian-Mage Posted February 17, 2008 Share Posted February 17, 2008 I parse all of my xhtml pages as php, because I have a lot of php in them. The problem is, to have a perfectly valid xhtml document, I need this line:<?xml version="1.0" encoding="utf-8"?> My webhosting provider has set php to accept a <? tag as php, so now my pages just come up with an error. How can I include the above line in php, can I add a line to my htaccess file or what? Link to comment https://forums.phpfreaks.com/topic/91558-in-a-php-doc/ Share on other sites More sharing options...
kenrbnsn Posted February 17, 2008 Share Posted February 17, 2008 You need to echo the line in the correct place: <?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?> Ken Link to comment https://forums.phpfreaks.com/topic/91558-in-a-php-doc/#findComment-468966 Share on other sites More sharing options...
Rithiur Posted February 17, 2008 Share Posted February 17, 2008 You can also disable the short tags by adding the following line to your .htaccess file in the directory php_value short_open_tag 0 Link to comment https://forums.phpfreaks.com/topic/91558-in-a-php-doc/#findComment-468981 Share on other sites More sharing options...
Guardian-Mage Posted February 17, 2008 Author Share Posted February 17, 2008 Thank you Ken, I don't know why I didn't think of that, and thank you Rithiur, I needed that code. Link to comment https://forums.phpfreaks.com/topic/91558-in-a-php-doc/#findComment-469064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.