# PHP current file

**URL:** <https://forum.kirupa.com/t/php-current-file/165594>\
**Category:** programming\
**Created:** [October 12, 2005, 11:49am UTC](https://forum.kirupa.com/t/php-current-file/165594 "2005-10-12T11:49:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lost\_Soul](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@Lost\_Soul](https://forum.kirupa.com/u/Lost_Soul)\
**Post date:** [October 12, 2005, 11:49am UTC](https://forum.kirupa.com/t/php-current-file/165594/1 "2005-10-12T11:49:11Z")

</div>

Hi all,  
Could someone please tell me how to reference the current php file. There must be an equivalent to the ‘this’ identifier that’s in flash!

e.g. how could I modify this code so that it’ll run on whichever page its placed.

\<?php  
$last\_modified = filemtime(“THIS.php”);  
print("\<h3\>last updated: ");  
print(date(“m/j/y h:i\</h3\>”, $last\_modified));  
?\>

Cheers good people of Kirupa!

ps I’m new to php (big surprise!), what should I call it PHP, php, Php, etc? Just wondered! Thanks again! 🙂
