Re: Get filename in php command line

From: Date: Tue, 17 Jul 2001 16:08:24 +0000
Subject: Re: Get filename in php command line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58290@lists.php.net to get a copy of this message
I had that before. OK, seems that my problem is not that simple. The thing is , I have something like this in my file test.php: require('my_api.inc'); echo "This is test.php3"; Now, in my_api.inc, I want to know that I run test.php3, when I do bash$ php test.php3 and the filename is test.php3 . __FILE__ will give my my_api.inc instead. I need it because my_api.inc do all sort of authenticating, session, etc. Any solutions? Thanks. Reuben D. Budiardja On Tuesday 17 July 2001 10:52 am, Boget, Chris wrote: > > Seems that $PHP_SELF is not defined when it's run from the > > command line. > > Try: > > __FILE__ > > Chris

« previous php.general (#58290) next »