Well, on the webservers I am using this would mean that the current user has read access to this folder aswell. E.g. /home/users/james /home/users/matt /home/users/patrick /home/users/shared Im used to that *james* only have read access in .../james/* Matt has only in .../matt/* and such, which would make it impossible to include anything in the .../shared/* folder. Unless you have root privilegies and can set up special rights. This would also only work as all the files are on the same server, as PHP cant include PHP code via HTTP (atleast in my knowledge). I have another sollution, which isnt quite as good, but I program all my PHP in classess and have a "standard" class file, that is identical for all customers. Difference is only what classes each client are using. As I develop my classess I see to that they are always backwards compatibel, this way I only have 1 (or more, but same directory) that I have to update. This makes it easy in my opinion, just connect with FTP - > Update the files and Im down. -- Kim Steinhaug --------------------------------------------------------------- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. --------------------------------------------------------------- "Peter Lovatt" <pjln1@xxxxxxxxxxx> wrote in message news:NFBBKAGAILLHPFOOAKFIGEGFHCAA.pjln1@xxxxxxxxxxxxxx > Hi > > I do exactly this on servers running several hundred sites. > > each site has a single file in the root, with any local config and a > variable $inc_root set. > eg > <?php > $config_var1 = 'xyz'; > $config_var2 = 'xyz'; > $inc_root = '/home/sites/shared_stuff/'; > //must be an absulute not relative address > ?> > > all files are then referenced as > > include($inc_root.'directory/sub_directory/file_i_want.php') > > If you move things a lot you could link each site to a single file which > sets the $inc_root, so you only change one file. > > > HTH > > Peter > > > > > -----Original Message----- > From: mike [mailto:mikec@xxxxxxxxxxxxxxxx] > Sent: 13 November 2003 14:42 > To: php-db@xxxxxxxxxxxxx > Subject: using code for multiple sites > > > I currently manage several websites that share the same code. > This code is included into many of the pages on every site. > I have duplicate copies of the code set up in each virtual host > directory. > Obviously this wastes space on my server and wastes my time having to > update them all. > > I was looking for suggestions on the best way to be able to access these > php files through includes for each site. > A couple of the options that I have already looked into were- > I could put the code all into one directory for site A > and when I want to include these files I would have to include the full > path to the files > I really don't want to have to do this because I frequently move things > and I would have to change the path on each file. > > either put these files into .:/usr/local/lib/php > > or > create a directory called "inc" in /usr/local/apache > and then add the following line to php.ini > include_path = ".:/usr/local/apache/inc " > > I hope I made it clear what I want to accomplish. > If you could give your recommendations I would greatly appreciate it. > > Thanks in advance, > > > > > Mike > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Mike Calvelage > > Webmaster / Sales Associate > > Viper Systems > > _.·´¯`·.¸¸->vipersystems.biz <http://www.vipersystems.biz/> <-¸¸.·´¯`·._ > > mikec@xxxxxxxxxxxxxxxx > > 419-224-8344 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php