i've got a php page, savings.php, which consists of numerous includes,
e.g.
<table border=0>
<tr><td><img src="../graphics/headings/rates/savings.gif"
width=471 height=31 border=0 align=right alt="Savings"></td></tr>
<? include("savingsheader.php"); ?>
<tr><td class=bodytext><br>
<table width=100% cellspacing=0 cellpadding=1 border=0>
<? include("sav-nonotice.php"); ?>
<? include("sav-internet.php"); ?>
<? include("sav-notice.php"); ?>
<? include("sav-monthly.php"); ?>
<? include("sav-cheque.php"); ?>
<? include("sav-key.php"); ?>
</table>
each of these includes are a series of table rows...
at the end of each included file, there is another include,
<? include("lastupdated.php"); ?>
this is a short php script that shows the last modified date of the
file.
however, the problem I am having is that it is showing the modified
date of lastupdated.php and not the updated date of the page that
calls it.
it works fine if I don't use includes and place <? echo date( "l jS F,
Y", getlastmod() );?> directly in the page, but because of colspan
problems, i'd like to use an include.
i've tried using $PHP_SELF, but that gives 'savings.php' as the
referring file - which is not the date I want..
<? echo date( "F d, Y. H:i:s a",
filemtime(substr($PHP_SELF,strrpos($PHP_SELF,'/')+1))) ?>
I know I can specify the filename, e.g below, but the script needs to
know which page was calling it...
<? echo date( "F d, Y. H:i:s a", filemtime('sav-internet.php')); ?>
is there a simple way around this ??? or should I just forget about
using an include for this and just insert the getlastmod on each page
??
hope you can help me with this!
janus