Govinda wrote:



in my include statement, I am now successfully using:
/home/metheuser/public_html/
and am not anticipating moving this site.. but still I am thinking there must be a way to make the code bullet proof to dir/ name changes *after* the virtual server root.
Or do people just stop here?


I always define the include path explicitly, and it never includes anything inside the web root, but that's just me.

I use

$includeArray[]="/usr/share/pear";
$includeArray[]="/some/other/path";
$includeArray[]="/yet/another/path";

$incPath = impode(':',$includeArray);
ini_set("include_path",$incPath);

Since all my includes are external to the website where they don't ever need to moved no matter how I decide to change things, their paths never move. Served files inside the web root however can move around freely and always find their includes.

I admit, keeping all excludes outside the web root can be a bit tedious, but it helps keeps things well organized.

There's more than one way to do it though.

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

Reply via email to