PHP: Get filename of the currently executing script
Posted on May 21, 2008, Filled under PHP,
Bookmark it
Using this piece of code you will get the filename of the currently executing script without containing the full path to it.
For instance if $_SERVER['PHP_SELF'] is equal with /public_html/web/login.php our code will return only login.php
$self = basename($_SERVER['PHP_SELF']);
Do you wish to receive the latest updates as soon as they are posted? Get our RSS Feed or Subscribe to the Newsletter!
- May 21, 2008
- article by Gabriel C.
- Leave a reply!
Sponsors
Related Posts
-
Create, Customize and Send Newsletters: MeeNewsat August 3, 2009 with 1 comment
-
Get filename extensionat July 15, 2008
-
How to remove an extension from a filenameat September 4, 2008 with 1 comment
-
Create a PHP Script that Logins in to a Password Protected Areaat December 17, 2008 with 14 comments
