tags:

views:

43

answers:

2

I know hot to set an include path:

set_include_path('/path');

But how can I set multiple include paths? For example, two different directories.

+2  A: 

Separate them with colons (:).

set_include_path("/some/dir:/other/dir:.");

More info on php.net.

Adam Backstrom
+2  A: 

To do this in a cross platform manner use the PATH_SEPARATOR constant:

set_include_path('/my/path' . PATH_SEPARATOR . '/my/other/path');

FYI: You can also set the include path in php.ini or in your apache vhost configuration.

For your further reference: PHP documentation on set_include_path()

Asaph