Re: PHP equivalent to Perl $0

From: Date: Thu, 01 Feb 2007 00:12:15 +0000
Subject: Re: PHP equivalent to Perl $0
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-248107@lists.php.net to get a copy of this message
On 1/31/07, Richard Luckhurst <rluckhurst@resmaster.com> wrote:
Hi In Perl there is the predefined $0 which contains the name of the file containing the Perl script being executed. Is there an equivalent in PHP? I am working on converting a Listener script from Perl to PHP and at one point when the script forks it has a line $0 = "Listener is accepting connections on Port $port"; When this Perl script is running and I do a ps I see a process ID with the program being Listener is accepting connections on Port $port instead of the actual name of the Perl script. Is such a thing possible in PHP? If so how? I have been Google searching for a while and can not see one way or the other if it is possible. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __FILE__ contains the full path and filename of the file on the
filesystem. There are several $_SERVER indices that give something you can get the filename/path from as well. See http://us2.php.net/manual/en/reserved.variables.php -- Kevin Jordan

« previous php.general (#248107) next »