Re: PHP variable to return filename?

From: Date: Thu, 22 Jun 2000 19:21:43 +0000
Subject: Re: PHP variable to return filename?
Groups: php.general 
Request: Send a blank email to php-general+get-2687@lists.php.net to get a copy of this message
Remember that you can check phpinfo() to see what variables are set. If you don't see a variable that has just the filename portion of $PHP_SELF, you could do something like this: // PHP4 ereg("^.*/(.*)$", $HTTP_SERVER_VARS["PHP_SELF"], $regs); echo "filename: $regs[1]"; That regular expression is just off the top of my head, so it could definately use some improvement. But I think it should get you down the right path. -- Matthew Leverton - matthew@aeroinc.net - http://www.allegro.cc -----Original Message----- From: Chris Sano <sano@mail.rit.edu> To: PHP List <php-general@lists.php.net> Date: Thursday, June 22, 2000 2:13 PM Subject: [PHP-GENERAL] PHP variable to return filename? I know this is another one of my lame questions, but what is the built-in PHP variable that will return the current filename whcih is being executed? I tried $PHP_SELF and that returned the whole PHP path. Chris ___________________________ got sano? (new design!) http://www.rit.edu/~cms0670

« previous php.general (#2687) next »