Jump to content

Recommended Posts

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.so
AddHandler php5-script php
AddHandler php5-script xphp
AddType text/html php
AddType 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?
Link to comment
https://forums.phpfreaks.com/topic/15634-xhtml-with-php/
Share on other sites

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.so
AddHandler php5-script .php
AddHandler php5-script .xphp
AddType text/html .php
AddType application/xhtml+xml .xphp[/code]

Please Help.
Link to comment
https://forums.phpfreaks.com/topic/15634-xhtml-with-php/#findComment-63733
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.