Forum Moderators: coopster

Message Too Old, No Replies

Help Getting PHP started

Not too well versed in php...

         

carfac

5:20 pm on Apr 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi:

I want to add a (one!) php page into an existing site. I KNOW I have php in the Apache build, so that is not a problem. Basically, just want to add a news feed via php.

OK, so I set up a dummy doc, and added this code, which should send me the feed:

<?php include "http://url.to/news.html";?>

And nothing comes up!

I made the directory executable, added Options ExecCGI to the directory container. What else do I need to do to enable php to parse the doc?

Thanks!

Dave

oilman

5:27 pm on Apr 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



are you trying to parse the php in an html document? if so you need to set your server to parse .html or .htm as well as .php - you can do it quite easily with htaccess. Just add this line to the htaccess file:

AddType application/x-httpd-php .php .htm .html

carfac

5:38 pm on Apr 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oilman:

Thanks- that is probably what I need to do!

Sorry for the wrong forum... I just gravitate to Webmaster General for ecverything... :)

dave