Re: \|/ $PHP_SELF

From: Date: Tue, 20 Nov 2001 16:57:37 +0000
Subject: Re: \|/ $PHP_SELF
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-75264@lists.php.net to get a copy of this message
If you just need the filename of the include file you can set it in code by assigning it to a variable at design time. Something like $ThisPage = "include.php". You could also do this for the entire path, but it would need to be changed whenever you put the script in a different place. Fred Gerry Figueroa Anadon <gerry@dynamicintermedia.com> wrote in message news:3BFA2814.FD072922@dynamicintermedia.com... > Any Ideas as to how I could be able to acomplish this? > or > How could I get the path of the main page and pass it on to the included file for processing?. > > thanks! > > Fred wrote: > > > $PHP_SELF will always give the name and path of the main file, even if the > > variable is set in an included file. The reason is that the included file > > is included before the variable is evaluated. > > > > Fred > > -- > Gerry Figueroa > Dynamic Intermedia

« previous php.general (#75264) next »