add in "news flash" type add on to HTML page
I came into this forum when I asked google [add in "news flash" type add on to HTML page]
What I want to do is modify a two of more HTML web pages, then by just writing one extra page (whatever) the text from that page gets automatically displayed on to all the HTML pages that got modified.
I am not sure if my basic PHP knowledge will do the answer without some untidy looking window in the page. also should I learn XML (if that is the way to go)
By the way
The reply I got from google link did not work
if this a repeat just delete it, not sure if I finished posting question
Using PHP to do it (if I understand "it" correctly) is certainly a viable option -- if your pages are created as PHP pages. The simplest way is with the PHP readfile() function.
news.txt (or whatever you want to call it):
<p>This file has your news in it, marked up as HTML
that you want to use in your web pages.</p>
<!-- stuff you want in the page markup before the news section -->
<?php readfile('path/to/news.txt'); ?>
<!-- stuff you want in the page markup after the news section -->
Unfortunately NogDog they are all already HTML pages. so this is the problem. otherwise I may of come up with a solution similar to your answer.
Um what is this Sempervivum? how strange.
Forum error caught him. And when they hit you, forget everything.
Originally Posted by eric@auckland
It is possible to process files with .html suffixes as PHP (or with any other suffixes for that matter), as long as you can modify the web server config -- which could be done with a local .htaccess file in your site's directory if running Apache, something like:
AddType application/x-httpd-php .html .htm .php
Originally Posted by NogDog
OK I put a file called .htaccess at my website but I had to change the contents of the file to
AddType application/x-httpd-php html htm php
(remove the 3 dots)
Now that was the only way I could get a file.php to come up when I put http://www.website.com/file.html
But then my website visitor recorder stopped working, so I put everything back to normal,
(the website visitor recorder is written in PHP and records information the a text file (filename.txt))
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)