>__FILE__ shows the script filename, not to the path of the current dir. >Where can I find out more about this kind of constants? Can't see it >anywhere in the manual.
Yeah, that's what it does. The point is that your current dir (upon execution) will be the location of your DirectoryIndex script. The difference between REQUEST_URI and SCRIPT_NAME will give you a relative path from the location of __FILE__ to the directory in the request, /if/ REQUEST_URI is a subdirectory or dirname(SCRIPT_NAME). Use chdir() to get there as in my previous mail, and you're set. In your example, it's harder to do because there isn't a foolproof way for PHP to know what filesystem directory your Alias maps to, unless you tell it explicitly, which doesn't scale well as you add more directories. The easy solution would be to have your lister.php script in a parent of the directory whose contents you want listed. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php