Do you have a question? Post it now! No Registration Necessary. Now with pictures!
December 7, 2006, 10:43 pm
rate this thread
I want to make my XML feed dynamic. For example
test.xml?info=hello as a link and the feed to include the word hello when
echoed in a PHP statement $info.
I have changed the .htaccess file with the following:
AddHandler application/x-httpd-php .xml
I doesn't seem to work and I don't want to change the core files on the
server. Has anyone done this before or does anyone have some ideas?
David - http://www.pubtricks.com
Re: XML with PHP content
This won't work -- "application/x-httpd-php" is not a handler, it's a MIME
type. The correct syntax is like:
AddHandler php-script .xml
with a corresponding "Action" directive, something like this:
Action php-script /cgi-bin/php
Where /cgi-bin/php is the path to your PHP interpreter.
Alternatively, if mod_php is installed (it usually is), then you can use
AddType application/x-httpd-php .xml
This doesn't work because there is no such file as "test". It's called
Make sure you include the following in your PHP:
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact