|
Posted by Tom on 08/08/07 18:15
On Wed, 08 Aug 2007 18:00:39 GMT, nospam wrote...
>
>Hello,
>
>Sorry for the newbie question. I am trying to add some dynamic content to
>an existing HTML page. I would like to add a random saying to an area of a
>HTML doc. Sort of like a "fortune" - that would display a different fortune
>every minute.
>
>I figure that I can write a PHP script to select a random fortune from a
>file, but how do I embed that text within a HTML doc.I want to keep the HTML
>document just as it is now but add this php text. I don't want to rename
>MyHtml.html to MyHtml.php which I can do now.
>
>Is there a way to execute a external php script from within an HTML and have
>its return value displayed in the HTML?
>
>Thanks in advance,
>bruce
>
>
Within your web server configuration, there's probably a line similar to this..
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
You can also specify the html and/or htm file extensions by appending these
lines below that...
AddHandler application/x-httpd-php .htm
AddHandler application/x-httpd-php .html
You would need to restart Apche again so it rereads the config file, but should
get you were you want to go. It would allow you to add PHP content with the HTML
pages, so that you don't have to rename all the pages on your site to .php
files.
Tom
--
NewsGuy Takes Usenet Cellular!
Download newsgroup MP3's to your Cell or PDA
Free Trial - http://newsguy.com/cellphone.htm
Navigation:
[Reply to this message]
|