On 11/29/06, Internet.Maestro@xxxxxxxxx <internet.maestro@xxxxxxxxx> wrote:
Hello all, I am writing new php application which will be used by several sites. All sites will use same script (all files), but every will have its own config.php file. I would like to place all necessary files to separate directory and all sites should share them, so all sites will be updated. for e.x. structure will be: | - script directory |- site1.com dir config.php |- site2.com dir config.php |- site3.com dir config.php Does anyone have idea how to organize and share files?
My thinking is always like: siteX.com/ include/ secure/ where siteX.com has a basic common code base, include/ has common code that is shared across siteX.com, and in secure you have individual settings per site, for example siteX.com/index.php: require('setup.php'); include/setup.php: require($siteX .'.setup.php'); // perform standard setup routines // include standard things you need to use accross sites secure/$siteX.setup.php // setup defines specific to the site and used in include/setup.php and then you ensure you have set your your include_path to: root_to/secure:root_to/include:root_to/:.:/usr/local/lib/php/ Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php