News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

faking an xml document with php

Started by Thantos, December 02, 2005, 01:55:28 AM

Previous topic - Next topic

Thantos

I'm thinking about setting up a Package Server for my stuff but its hardcoded to use packages.xml
Now this isn't really a problem but I'd like to dynamically create the file.
So does anyone know a way I can create a php document that'll execute and output when someone goes for packages.xml?

Apache 2 with php 5 running on debian.

Grudge

I believe your best bet is to put in a .htaccess file into your package directory to tell Apache to pass that file as PHP. I can't remember the syntax, but if you check your current http.conf file and search for php you'll find the line which tells apache which files to run php on.
I'm only a half geek really...

Thantos

#2
Thanks

Edit:
AddType application/x-httpd-php .xml did it for me :)  Thanks again

Advertisement: