|
Posted by "George Pitcher" on 09/30/92 11:25
Hi,
I have five sites using the same code, apart from images and database
connection.
I wanted to set them up so that they share the code and a config file sets
up the individual bits.
I'm currently on IIS so this is how I went about it.
Set up a folder containing the php files. In that folder I have the
following:
folders
--templates
--images (contains common images used across all sites)
and for each website
--site_includes (contains config and image files)
--site_templates_c
--site_cache // added later
--site_configs // added later
For 'site' above, I replace with the virtual host name as used by IIS.
I then set IIS to point the various virtual hosts to that main folder and
the home.php checks the 'ORIG_PATH' to know which site it is in and then
calls the appropriate site_includes folder and stores the 'site' in a
cookie.
Initially, I figured that the individual site_templates_C would keep the
data from mixing across sites but that didn't work and I had images failing
to display correctly and data traversing across the sites. I then created
individual site_cache and site_configs folders for each site and that seems
to be working fine.
This might help someone else out the wanting to do something similar with
Smarty. I'm not sure how this works with Apache, but As I'm migrating to
Apache2 (win2003) in the new year, I'm going to find out.
Cheers
George
Navigation:
[Reply to this message]
|