Chris Tankersley

PHP Include Paths By Virtual Host

Posted on 2007-12-28

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.


Comments

Categories: Programming Servers

Tags: Apache PHP