NYCPHP Meetup

NYPHP.org

[nycphp-talk] How do you do the equivalent of $PHP_SELF for PHP scripts not in docroot?

Joel De Gan joel at tagword.com
Tue May 18 14:57:24 EDT 2004


On Tue, 2004-05-18 at 12:36, Andrew Yochum wrote:
> Try the __FILE__ constant.  Example:
>     echo __FILE__;
> 

There is also getcwd() for the dir.. i.e.
$dir = getcwd();
$file = $dir . "/" . $PHP_SELF;

cheers
-- 
joeldg - developer, Intercosmos media group.
http://lucifer.intercosmos.net




More information about the talk mailing list