Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set numerous include paths?

I know how to set an include path:

set_include_path('/path');

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

like image 579
Richard Knop Avatar asked Oct 22 '09 18:10

Richard Knop


1 Answers

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()

like image 163
Asaph Avatar answered Sep 21 '22 01:09

Asaph