[Techtalk] Web site setup

Akkana Peck akkana at shallowsky.com
Thu Apr 21 15:40:59 EST 2005


James Allen writes:
> I use
> 
> <?php
> $title="PAGE TITLE";
> include("header.inc");
> ?>
> 
> content
> 
> <?php
> $updated = "DATE";
> include("footer.inc");
> ?>
> 
> $title and $updated being variables in my included files. Just

I use something similar to this on part of my site (though I use
require, not include).  But is there any way to avoid having to
set $updated in every file?  I tried to use something like 

Last modified: <?php print("$datemod") ?>

in the included footer, but all I could get it to do was print the
last-modified date of the footer file, not of the file including
it.  Is there any PHP way to say "the last-modified date of the
html file (not the PHP include) currently being shown" ?
I hate having to edit every file on the site to add identical
snippets of code; seems like that goes against the whole point
of having includes.

	...Akkana


More information about the Techtalk mailing list