Well dad-burnit - I use that all the time but never thought that it could be used this way. Flawlessly right...and this side of solving world hunger. Thanks. Jeremy Weiss wrote: > Bob, > > I believe you may be looking for $PHP_SELF > http://us2.php.net/manual/en/reserved.variables.server.php > > or possibly, __FILE__ > http://us2.php.net/manual/en/language.constants.predefined.php > > >From the first link: > The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar would be /test.php/foo.bar. The __FILE__ constant contains the full path and filename of the current (i.e. included) file. If PHP is running as a command-line processor this variable contains the script name since PHP 4.3.0. Previously it was not available. > > > -jeremy > > > -----Original Message----- > From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Bob Meetin > Sent: Thursday, October 30, 2008 2:41 PM > To: thelist at lists.evolt.org > Subject: [thelist] php function to return filename > > is there a php function that can be used to return the filename that it > is sitting in, or actually to place the name into a variable? > > <?php > > $this_file = some_php_function(); > > ?> >