[PHP] $PHP_SELF on include file

2002-03-20 Thread José León Serna

Hello:
I would like to do the following:

a.php
--

  include b.php;


b.php
--

echo $PHP_SELF;


in b.php, instead show a.php as the script is executing, I want to know if
there's a way to show b.php, that is, the included file is being executed.

Regards.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $PHP_SELF on include file

2002-03-20 Thread José León Serna

Hello:
 try it with __FILE__
 you might have to work a little on the resulting string, but it at least
 delivers the current file's name
What is __FILE__, a global var, an environment variable? Could you put a
simple example?

Regards and thanks for your quick answer.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $PHP_SELF on include file

2002-03-20 Thread Wolfram Kriesing

On Wednesday 20 March 2002 10:12, José León Serna wrote:
 Hello:
  try it with __FILE__
  you might have to work a little on the resulting string, but it at least
  delivers the current file's name

 What is __FILE__, a global var, an environment variable? Could you put a
 simple example?

print( __FILE__ );
echo __FILE__;
will show the current file name

-- 
Wolfram

... translating template engine 
  http://sf.net/projects/simpletpl

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] $PHP_SELF on include file

2002-03-20 Thread José León Serna

Hello:
 echo __FILE__;
 will show the current file name
Oops! Thanks! ;-))

Regards.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php