Re: $PHP_SELF in include files

From: Date: Tue, 12 Mar 2002 23:17:07 +0000
Subject: Re: $PHP_SELF in include files
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-88260@lists.php.net to get a copy of this message
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="#003399">U</font></b><font face="Times New Roman" size="2"> </font><font face="Times New Roman" size="4"><b> <a href="<?php echo $PHP_SELF?>?page=questions"><font color="#CC0000">Questions</font></a></b></font><font face="Times New Roman" size="2"><BR> Insert questions here.</font><P><b> <?php } ?> Thanks, Dave "Lars Torben Wilson" <torben@php.net> wrote in message news:1015974570.2134.94.camel@ali... > 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 path to a.php. What result are you getting? > > > -- > Torben Wilson <torben@php.net> > http://www.thebuttlesschaps.com > http://www.hybrid17.com > http://www.inflatableeye.com > +1.604.709.0506 >

« previous php.general (#88260) next »