Re: Get the current file name

From: Date: Fri, 25 Jul 2003 13:59:24 +0000
Subject: Re: Get the current file name
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-156851@lists.php.net to get a copy of this message
thanks for your reply, but that doesn't seem to work either, how about removing everything after and including the ?, how would i do that? "Manoj Nahar" <manoj@mail15.com> wrote in message news:3F213670.203@mail15.com... > u can try > $filename=$_SERVER[SCRIPT_NAME]; > > Manoj > > > Shaun wrote: > > >Hi, > > > >due to a current PHP upgrade i am unable to use the following code to get > >the filename of the page: > > > >$s = getenv('SCRIPT_NAME'); > > > >I need to get the filename without any avariables attached. For example if > >the URL is > > > >www.mydomain.com/test.php?test=yes > > > >using $s = getenv('PHP_SELF'); > > > >returns test.php?test=yes > > > >how can I return just test.php i.e. the filename on its own > > > >Thanks for your help > > > > > > > > > > > > >

« previous php.general (#156851) next »