Is there a way for PHP to know what filename it is currently running from?
PHP has access to quite a bit of information from the server. Make a page containing this
<? phpinfo() ?>
Run it and study the output.
You can grab the environment variable from the webserver:
$thispage = getenv("SCRIPT_NAME");
For the full path (DocumentRoot): $thispage = getenv("SCRIPT_FILENAME");
Jon
Try $PHP_SELF
Dave
=========================================== http://badblue.com Free small footprint web server for Windows