Running XML as PHP

djalam

Member
Messages
89
Reaction score
2
Points
8
Quick Question, How do I Run XML as PHP through .htacess?

I tried writting this: AddType application/x-httpd-php .xml
but it didn't work, instead it just gave me the option to save the xml file instead of viewing it. I Run some php in the beggining to retrieve some feed data. If anyone can help, Big Thanx:wink:

UPDATE EDIT: changed the above line to "AddHandler application/x-httpd-php5 .xml" and it seems to be working now, but now getting some php error didn't have the same problem when was testing on a local server so here is the code

<?php
header("Content-Type: application/xml; charset=ISO-8859-1");
$feed = feed_function();
?>
<?xml version="1.0" encoding="utf-8"?> <<<<<<<<<<<THIS like is causing error, any idea
......Some XML stuff like author blah blah

<?php
//run while list
?>
<description><?php echo $title ?></description>
<?php endwhile; ?>

---------- Post added at 12:37 ---------- Previous post was at 10:11 ----------

Please close this thread, Issue Solved
 
Last edited:
Top