Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php,alt.comp.lang.php,alt.php Subject: Re: Newbie needs recommendation for fast learning a little php. Date: Wed, 30 Jun 2021 15:09:57 +0200 Lines: 39 Message-ID: References: <35nodg56nqinnfigtl6251fhlpkb42vb61@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net wdNJPz0GLqkGN0RAZfowAwTbps2w1DyCl5ytSDxoPMU0S+wNur Cancel-Lock: sha1:VRrpvQj9MpWJB6mzvWF6w/LSEwQ= In-Reply-To: <35nodg56nqinnfigtl6251fhlpkb42vb61@4ax.com> Xref: csiph.com comp.lang.php:18695 alt.comp.lang.php:54 alt.php:3261 Not_even_a_newbie@example.net: > This does what I want, but only as a .PHP file. How do I get it into a > file named foo.html so I can have foo.html declare when it was last > modified? > > $file = $_SERVER["SCRIPT_NAME"]; > $break = Explode('/', $file); > $pfile = $break[count($break) - 1]; Why this? > //echo $pfile; > echo "This file was last modified on: " .date("Y-m-d > H:m",filemtime($pfile)); > ?> > > I feel as if I'm almost there. Much simpler: Also see: "'SCRIPT_FILENAME' The absolute pathname of the currently executing script." -- Arno Welzel https://arnowelzel.de