on 24/07/02 2:00 PM, Dave at Sinewaves.net ([EMAIL PROTECTED]) wrote:
> That works fine for files with .php extensions, but I need something to add
> code to html pages as well... Any ideas???
Well, this IS a php list :P
If you have control over the apache config, you can specify all .html files
to be parsed in the same way as .php -- although there will be some kind of
There is mod_ssi (server-side includes) which works on .shtml pages (or all
.html pages if you specify it in the apache config.
But in both cases, you want the "bit of code" (a banner I guess) to appear
after the BODY tag, and possible after some other code, like tables n stuff,
so auto-prepending will not work, and realistically, *total automation* of
this process will be impossible to achieve in standard HTML files, due to
the nature of WHERE you need to position the banner, and the fact that the
HTML before the banner will be different on a page-by-page basis.
I'd have a bunch of php files which all have a snippet of code in them for
... some layout stuff ...
<? include('inc/getRandomBanner.php'); ?>
.. the page content here ...
getRandomBanner.php would be a small file which get a random (or specific)
banner from a database or directory, and returns the appropriate HTML code
(an anchor and an IMG tag) in the correct place.
SSI would have similar structure, but with different limitations.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php