Chris Tankersley

· PHP Jack of All Trades ·

PHP Include Paths By Virtual Host

While splitting apart a website into discreet applications, I moved all the shared code to its own folder. While that isn't a hard thing to do, what does one do in a development environment where the shared files might be undergoing changes that you don't want other environments to see?

Set a custom include path!

In each of my Virtual Host sections, I added the following line:

<strong>php_value include_path '/path/to/my/include'</strong>

With a restart of Apache, each environment now looks to its own custom include folder.


Categories: Programming, Servers

Tags: Apache, PHP