Re: using code for multiple sites
| From: | CPT John W. Holmes | Date: | Thu, 13 Nov 2003 16:36:36 +0000 |
| Subject: | Re: using code for multiple sites | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31562@lists.php.net to get a copy of this message | ||
From: "Chris Boget" <chris@wild.net>
> > > 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'd use a method like this, although I'd probably just use an absolute
path
> > instead of adjusting the include_path.
>
> What's the benefit of using an absolute path? If you did need to change
the
> include path, you'd only have to do it in one file. Or am I
misunderstanding
> what you are saying (likely)?
I don't think there's much of a benefit, really. I really don't like being
dependent upon php.ini changes (although you can change the include_path
with ini_set()).
Generally, the way I program is to have a variable in an include file that
determines the "include path", anyhow. So, if the program or these include
files move, I still only have to change it in one place (well, one place in
each program using the absolute path, I guess).
This all comes down to a matter of preference. Since all of the scripts are
on the same computer and you can change php.ini, the above method (yours) is
probably the easiest to use.
---John Holmes...