Re: Script Nane in CGI mode
| From: | Tom Rogers | Date: | Fri, 14 Mar 2003 01:00:31 +0000 |
| Subject: | Re: Script Nane in CGI mode | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139630@lists.php.net to get a copy of this message | ||
Hi,
Friday, March 14, 2003, 6:36:04 AM, you wrote:
BY> Hi
BY> When you want to know the name of the script you are running you can use
BY> : $SCRIPT_NAME.
BY> However, this info is not available when running a PHP script in CGI
BY> mode.
BY> If i have a fine called berber1.php and a link to this file called
BY> berber2.php, how can i know in the code
BY> if it has been called from berber1.php or berber2.php?
BY> thanks
BY> berber
BY> --
BY> PHP General Mailing List (http://www.php.net/)
BY> To unsubscribe, visit: http://www.php.net/unsub.php
$argv[0] will give you the command used to invoke the script (including the path)
--
regards,
Tom