leedude Posted July 25, 2006 Share Posted July 25, 2006 is there a way i can set my httpd server to generate xhtml pages with the xphp extension?The php parts of my httpd.conf file:[code]LoadModule php5_module /modules/libphp5.soAddHandler php5-script phpAddHandler php5-script xphpAddType text/html phpAddType text/xhtml xphp[/code]It isn't passing the xphp documents as xhtml, just html..xhtml documents work as xhtml though.I am testing this with a piece of code that generates a table with the <table> tag in capital letters (this brings an error in table.xhtml, but not in table.html as xhtml is case-sensitive where as html isn't).table.php and table.xphp both work! Why? Quote Link to comment https://forums.phpfreaks.com/topic/15634-xhtml-with-php/ Share on other sites More sharing options...
leedude Posted July 25, 2006 Author Share Posted July 25, 2006 ok, ive managed to get it to pass xphp as xhtml by setting the default mime type in php.ini to:[code]application/xhtml+xml[/code]Though this means that is doesnt pass php as html any more, but as xhtml.It is as if the settings in httpd.conf do not affect it at all.I've tried commenting the default mime type line in php.ini out, but that just makes it output as text/html.I have updated my httpd.conf file to be:[code]LoadModule php5_module /modules/libphp5.soAddHandler php5-script .phpAddHandler php5-script .xphpAddType text/html .phpAddType application/xhtml+xml .xphp[/code]Please Help. Quote Link to comment https://forums.phpfreaks.com/topic/15634-xhtml-with-php/#findComment-63733 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.