| | |
Php & Xhtml
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Did you give the page a .php file extension?
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Do you run apache?
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
We'll try to force apache to parse that file with the .xhtml extension as PHP. Put this code in an .htaccess file in the same directory as that .xhtml file:
Change
If this doesn't work, try adding a header to the page that indicates the content type is XHTML (not sure the right header info ATM).
PHP Syntax (Toggle Plain Text)
<Files file.xhtml> ForceType application/x-httpd-php </Files>
Change
file.xhtml with whatever the real file name is. This should force the server to parse any PHP in there. Hopefully this won't break any compatibility with the xforms. If this doesn't work, try adding a header to the page that indicates the content type is XHTML (not sure the right header info ATM).
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Sep 2006
Posts: 44
Reputation:
Solved Threads: 3
•
•
•
•
Thanks for you advice, I tried to force the server to parse the php by adding the <Files directive, but it breaks the XForm - I got just back from browser just name of the labels.
I have tried various headers, but did not found the right one, none worked.
MCP
You need to send this mime type with your PHP page and this should solve your problems: application/xhtml+xml
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
![]() |
Similar Threads
- PHP & File Extensions (PHP)
Other Threads in the PHP Forum
- Previous Thread: it's simple but yet complicated...php and mysql search..
- Next Thread: Image functions in php
| Thread Tools | Search this Thread |
# 5.2.10 action address apache api array auto autoincrement beginner binary broken cakephp checkbox class classes cms code cron curl database date dehasher destroy display dissertation domain dynamic echo echo$_get[x]changingitintovariable... email error errorlog fatalerror file files folder form forms function functions google href htaccess html if-else image images include insert ip javascript joomla legislation limit link load login mail masterthesis menu mlm multiple mysql mysqlquery oop open paypal pdf persist php popup problem query radio random record recursion remote script search server sessions sms sockets source space sql syntax system table tutorial update upload url validator variable video web youtube






