Re: Working directory of PHP pages?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clancy wrote:
It is my understanding that when you open a page the PHP server looks for index.php in the
site root directory, and loads it.

The web server (not php) looks for an index.php file (if configured to do so) based on the path.

http://www.example.com/subdir/folder/

will look in subdir/folder/ for an index file first.

You can use mod_rewrite or something similar to point everything to http://www.example.com/index.php .

 As a result the working directory of the page will be
the root directory of the site.  I have always worked on this assumption, and it has
always been correct.  On the other hand Stewart thinks that I cannot rely this, and am
likely to get into trouble as a result.

Are there any systems in which my assumption will not be correct?

Symlinked folders. You don't have the "real" working directory.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux