RE: [PHP-DB] using code for multiple sites
| From: | Jacob A. van Zanen | Date: | Thu, 13 Nov 2003 14:44:34 +0000 |
| Subject: | RE: [PHP-DB] using code for multiple sites | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31558@lists.php.net to get a copy of this message | ||
Hi
You could create an alias in every virtual host pointing to the same
directory for all sites, or I believe apache will use anything outside
the virtual host tags as being default for all sites.
Jack
-----Original Message-----
From: mike [mailto:mikec@vipersystems.biz]
Sent: Thursday, November 13, 2003 3:42 PM
To: php-db@lists.php.net
Subject: [PHP-DB] 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@vipersystems.biz
419-224-8344
~~~~~~~~~~~~~~~~~~~~~~~~~~~~