RE: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Jay Blanchard
[snip] 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? [/snip] $_SERVER['PHP_SELF'] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Kevin Jordan
On 1/31/07, Richard Luckhurst [EMAIL PROTECTED] 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

Re: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Chris
Jay Blanchard wrote: [snip] 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? [/snip] $_SERVER['PHP_SELF'] Or if you're using it from the command line, $argv[0] -- Postgresql php tutorials

Re: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Richard Lynch
On Wed, January 31, 2007 5:59 pm, Richard Luckhurst wrote: 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? $_SERVER['PHP_SELF'] I am working on converting a Listener script from Perl to PHP and

Re: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Mark Charette
Richard Luckhurst wrote: Hi Richard, RL And, frankly, why would you want to do that? It only sows confusion RL in ps output. :-) Unless you're talking about apps spawned by inetd and its cousins. ps shows the name as specified in arguments in the inetd.conf file, not the name of the

Re: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Richard Lynch
On Wed, January 31, 2007 6:42 pm, Mark Charette wrote: Richard Luckhurst wrote: Hi Richard, RL And, frankly, why would you want to do that? It only sows confusion RL in ps output. :-) Unless you're talking about apps spawned by inetd and its cousins. ps shows the name as specified in