[thelist] re:PHP : getlastmod

Jonathon Isaac Swiderski jonathon.swiderski at oberlin.edu
Thu Mar 15 22:01:53 CST 2001

--"adams.craigv" <hup at telusplanet.net> wrote:
> One quick solution would be to set a global variable in the include(s).
> <?php global $Mod_Date = getlastmod(); ?>
> And then you can use $Mod_Date in the file that is doing the including.

I don't honestly believe that that would solve a thing.  The problem is 
that the 'getlastmod()' IS being applied to the file doing the including, 
which is what I do NOT want.  I want it to be applied to one of the 
included files.

-- "T.Abbey" <Abbey at abbeyink.com> suggested:

> $mod_date = date("M. dS, Y", filemtime("$SCRIPT_FILENAME"));
>           echo "<cite>(Article added $mod_date)</cite>\n";

Thank you! After making "$SCRIPT_FILENAME" "contents.html", this worked 
perfectly! . . .

                   "Wherever there's somebody fightin' for a place to stand
Jonathon Isaac Swiderski                    Or decent job or a helpin' hand
jswiders at oberlin.edu              Wherever somebody's strugglin' to be free
135 W Lorain St OCMR 2678            Look in their eyes Mom you'll see me."
Oberlin OH 44074               - Bruce Springsteen, "The Ghost of Tom Joad"

More information about the thelist mailing list