PHP in a html page.

PHP in a html page.

Posted by: lunista
Posted on: 2007-02-03 20:29:00

I tried to add php to a webpage of mine so that a rss feed is auto generated on the page. Basically nothing happened. I have added it to www.lgmguild.net/news.html. I used http://guildwars.com/newsarchive/rss/news-current.xml as my rss feed. can anyone tell me how to get this working. I have the template, the php file both on the web server

Re: PHP in a html page.

Posted by: Raz2133
Posted on: 2007-02-03 20:35:00

In reply to:

I tried to add php to a webpage of mine so that a rss feed is auto generated on the page. Basically nothing happened.


By default, Apache is not configured to parse PHP code in HTML files. You can either give the file a .php extension, or add the following line to your .htaccess file to allow HTML files to contain php code.

AddHandler php-cgi .html .htm .php

Mark

Tags: html pagephp filenothing happenedweb serverxmlbasically