php-windows Digest 17 Aug 2004 01:07:32 -0000 Issue 2362
Topics (messages 24419 through 24419):
include_path and relative vs. absolute paths
24419 by: neil
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I am still getting used to .php after moving from .asp and one thing I had
trouble getting my head around was the apparent inability to use absolute
paths for include files.
If I change the include_path in php.ini to say -
include_path=".;c:\php\site1\inc" then I can access include files either
relatively
eg. require '../includes/somefile.php'; where the includes folder is at the
same level as the current folder
or absolutely
eg. require 'somefile.php'; where the file is either in the same folder or
is c:\php\site1\inc
Now the second option is fine except if I have multiple sites on the one
server.
With .asp it would just read /inc/somefile.inc either from the root of the
site or from a virtual folder but the include_path setting forces all the
sites to use the either the one include folder or at least not use the same
file names if there are multiple folders specified.
Does anyone know another way of dealing with this?
Thanks
Neil
--- End Message ---