faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

36 of 49 people (73%) answered Yes
Recently 7 of 10 people (70%) answered Yes


How to get the name of the current PHP file? to print its modification date in a global footer.

Aug 11th, 2002 11:20
Kathy Dopp,

I found the answer to my own question, use the $PHP_SELF PHP variable.  
The footer I included in all my php pages included this code for 
printing each PHP page's update time:
$filenm = "/var/www/13603/www.directell.com/htdocs" . $PHP_SELF ;
$filedate = date("F d Y",filemtime("$filenm"));
print "$filedate \n";