On Tue, 2002-02-12 at 13:44, Alex Shi wrote:
> I have a script need to be launched from terminal, and I want
> it to report the script's path. Because this script is required to
> be launched from command line, so those Apache env vars
> have not effect work, even $PHP_SELF don't work.
> Can anybody has a solution for this? Thanks in advance for
> any answers!
One way to do it:
$path_to_me = getcwd() . '/' . basename($argv);
Hope this helps,
Torben Wilson <[EMAIL PROTECTED]>
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php