Reply to Re: XML with PHP content

Your name:

Reply:


Posted by Toby Inkster on 12/09/06 08:35

Jemdam.com wrote:

> AddHandler application/x-httpd-php .xml

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:

AddType application/x-httpd-php .xml

> <Files test>
> ForceType application/x-httpd-php
> </Files>

This doesn't work because there is no such file as "test". It's called
"test.xml".

Make sure you include the following in your PHP:

<?php
header("Content-Type: text/xml");
?>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация