Hi
If you use PHP4.04 you can use the undocumented function pathinfo() which returns an array with
1. directory path, relative from webroot
2. filename
3. extension
If you use an older version of php, you can strip the directory from one of the available server vars. Use phpinfo() to find out which server variables are available to your script (depends on web server)
Hope it helps
Christoph