This is a discussion on Re: [PHP] Get the current file name within the PHP General forums, part of the PHP Programming Forums category; u can try $filename=$_SERVER[SCRIPT_NAME]; Manoj Shaun wrote: >Hi, > >due to a current PHP upgrade i ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 > > > > > |