This is a discussion on several sites sharing the same script within the PHP General forums, part of the PHP Programming Forums category; Hello all, I am writing new php application which will be used by several sites. All sites will use same ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? Thanks For Your Time ! |
|
|||
|
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 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. |
|
|||
|
http://php.net/include_path
On Wed, November 29, 2006 5:48 pm, 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 dir > config.php > |- site2.com dir > config.php > |- site3.com dir > config.php > > Does anyone have idea how to organize and share files? > > > Thanks For Your Time ! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? |