Re: several sites sharing the same script
| From: | Curt Zirzow | Date: | Thu, 30 Nov 2006 03:01:28 +0000 |
| Subject: | Re: several sites sharing the same script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245318@lists.php.net to get a copy of this message | ||
On 11/29/06, Internet.Maestro@gmail.com <internet.maestro@gmail.com> 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 dirMy 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.config.php|- site2.com dirconfig.php|- site3.com dirconfig.phpDoes anyone have idea how to organize and share files?