PDA

View Full Version : using multiple paths for the include_path setting



ali
11-01-2004, 12:00 PM
Hi.

I'm developing a website for a client that has his include_path setting to already point to another directory on his server. I want to have a seperate path that points to a directory that contains my classes. I heard you can use multiple include paths. Suppose the current include path is:



.:/usr/dir/dir2/dir3


And I want to have a setting that points to a folder whose path is:



/usr/dir_a/dir_b/dir_b


I want to give him the exact code to copy and paste at the end of the include_path setting in his php.ini file. It should be noted that the previous include path should also work, e.g the scripts that rely upon the previous path should still work. Can you help me?

Regards,
Ali.

ali
11-01-2004, 03:53 PM
anyone? I really need an answer fast..

wildjokerdesign
11-01-2004, 04:59 PM
You should just have to add the new path to the end of the list of directories. You put a : in between each path.


.:/usr/dir/dir2/dir3:/usr/dir_a/dir_b/dir_b

sarr
11-01-2004, 08:42 PM
I use the following for mine:



$include_path = dirname(__FILE__);
if ($include_path == '/')
$include_path = '.';
$include_path .= '/';

require_once($include_path . "parameters.php"); // Parameters
require_once($include_path . "util_fxns.php"); // Utility Functions