[PHP] $PHP_SELF in include files

2002-03-12 Thread David Johansen
Is there a way that I can use $PHP_SELF in include files, so that the function will use the URL of the php script that calls the include file? Thanks, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $PHP_SELF in include files

2002-03-12 Thread Lars Torben Wilson
On Tue, 2002-03-12 at 15:02, David Johansen wrote: Is there a way that I can use $PHP_SELF in include files, so that the function will use the URL of the php script that calls the include file? Thanks, Dave If a.php includes b.php, and you check $PHP_SELF in b.php, it should give you the

Re: [PHP] $PHP_SELF in include files

2002-03-12 Thread David Johansen
I'm doing exactly what you said and here's what it says when I call $PHP_SELF in the include file: http://12.254.227.149/brbWarning/b:%20%20Undefined%20variable:%20%20PH P_SELF%20in%20bc:/inetpub/wwwroot/pages.inc/b%20on%20line%20b35/bbr ?page=questions Lars Torben Wilson [EMAIL PROTECTED]

Re: [PHP] $PHP_SELF in include files

2002-03-12 Thread David Johansen
Here's the chunk of code in the include file that gave me that. I should have put it with the original post: ?php function questions() { ? font face=Times New Roman size=5 color=#003399U/font/bfont face=Times New Roman size=2 /fontfont face=Times New Roman size=4b a href=?php echo

Re: [PHP] $PHP_SELF in include files

2002-03-12 Thread Lars Torben Wilson
On Tue, 2002-03-12 at 15:13, David Johansen wrote: I'm doing exactly what you said and here's what it says when I call $PHP_SELF in the include file: http://12.254.227.149/brbWarning/b:%20%20Undefined%20variable:%20%20PH P_SELF%20in%20bc:/inetpub/wwwroot/pages.inc/b%20on%20line%20b35/bbr

RE: [PHP] $PHP_SELF in include files

2002-03-12 Thread Jason Murray
?php function questions() { [snip] a href=?php echo $PHP_SELF??page=questionsfont [snip] } ? $PHP_SELF is unknown to the function questions(). You'll need to add global $PHP_SELF at the top of the function. Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT Work

Re: [PHP] $PHP_SELF in include files

2002-03-12 Thread Jan Rademaker
On Tue, 12 Mar 2002, David Johansen wrote: you might try global $PHP_SELF; in that function... Here's the chunk of code in the include file that gave me that. I should have put it with the original post: ?php function questions() { ? font face=Times New Roman size=5

Re: [PHP] $PHP_SELF in include files

2002-03-12 Thread Lars Torben Wilson
On Tue, 2002-03-12 at 15:17, David Johansen wrote: Here's the chunk of code in the include file that gave me that. I should have put it with the original post: Ach. Well, $PHP_SELF is in the global scope, so you will either need to use 'global $PHP_SELF;' at the beginning of your function, or