June 13th, 2000, 09:38 AM
i have a PHP file say 'test.php'.
i want it be able to find out its filename.
and print it on screen.
anyone know how to do it?
June 13th, 2000, 10:30 AM
<?php echo $PHP_SELF;?>
June 13th, 2000, 10:39 AM
June 13th, 2000, 11:14 AM
the $PHP_SELF contains the path of the file.
i want the filename only.
I know it can be done by using explode() functions...
but is there another $PHPxxxx for showing filename only?
June 13th, 2000, 11:30 AM
Do not think? there is a function that just supplies the file name sorry! - it looks like regex or substr() is the next step! - regex will be easy if you know what the path will be - or how long the file name is - hopefully I am wrong and somebody else will post an answer.
June 13th, 2000, 12:21 PM
i have solved the problem by using two explode() functions
thx for your reply firepages!