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
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/):
__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.
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
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?
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
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
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
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
9 matches
Mail list logo