Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Simon Fredriksson
Sadly, none of your tips works. __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. The problem is this: DocumentRoot (/): D:/Web/htdocs/ Users (/~x/): D:/Web/users/ Stuff1

Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Stuart
Simon Fredriksson wrote: Sadly, none of your tips works. __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. The problem is this: DocumentRoot (/): D:/Web/htdocs/ Users (/~x/):

Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Michal Migurski
__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.

Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Michal Migurski
If you're running PHP as an Apache module, this may solve it: http://php.net/apache_lookup_uri Neat - I learn something new everyday! - michal migurski- contact info and pgp key: sf/ca

Re: [PHP] Finding out the local path to a file.

2004-02-24 Thread Simon Fredriksson
That was a really nice one to find out, thank you Stuart. Now, to another question (within the same scope). Is it possible for PHP to know if the attribute Indexes is in the list of allwed options? For right now, the script can list folders that are not supposed to be listed. Any ideas?

[PHP] Finding out the local path to a file.

2004-02-23 Thread Simon Fredriksson
I'm wondering if there's a way for PHP fo know the local path of REQUEST_URI. I've used a script to list directories, in order to replace the looks of the traditional Indexes look (apache). By setting DirectoryIndex to a fixed file (/list/lister.php) that file is now executed whenever there's

Re: [PHP] Finding out the local path to a file.

2004-02-23 Thread Evan Nemerson
On Monday 23 February 2004 04:31 pm, Simon Fredriksson wrote: I'm wondering if there's a way for PHP fo know the local path of REQUEST_URI. I've used a script to list directories, in order to replace the looks of the traditional Indexes look (apache). By setting DirectoryIndex to a fixed file

RE: [PHP] Finding out the local path to a file.

2004-02-23 Thread Chris W. Parker
Evan Nemerson mailto:[EMAIL PROTECTED] on Monday, February 23, 2004 4:33 PM said: dirname($_SERVER['SCRIPT_FILENAME'])? __FILE__ will also do it. ?php echo __FILE__; ? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding out the local path to a file.

2004-02-23 Thread Michal Migurski
I'm wondering if there's a way for PHP fo know the local path of REQUEST_URI. I've used a script to list directories, in order to replace the looks of the traditional Indexes look (apache). By setting DirectoryIndex to a fixed file (/list/lister.php) that file is now executed whenever there's no