Re: Including files - use absolute path?
| From: | (Stig Sæther Bakken) | Date: | Sat, 14 Apr 2001 22:57:48 +0000 |
| Subject: | Re: Including files - use absolute path? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-228@lists.php.net to get a copy of this message | ||
["Yasuo Ohgaki" <yohgaki@hotmail.com>]
> Hello all,
>
> Currently, PEAR assumes that path is defined for files to be included.
> ( require_once('PEAR.php'); )
>
> I don't want to use relative path nor define many path in php.ini nor pear to
> change include_path at run time nor set default path to PEAR at compile time.
>
> Is PEAR going to make use of PEAR_INSTALL_DIR? like
>
> require_once(PEAR_INSTALL_DIR.'PEAR.php');
>
> It would not break anything, would it?
> There is no description in CODEING_STANDARD how files should be included.
> (except use of include_once for including files conditionally)
>
> It seems PEAR include path will be ether defined in
> php.ini-dist/php.ini-optimized, or at compile time. I would rather not to see
> default include path which is added to PHP itself at compile time.
>
> What it would be?
The include_path has a default that is set at compile time, but can be
overridden in php.ini or in your Apache config. I usually set up an
include_path per virtual host in httpd.conf and don't install php.ini
at all.
Right now, PEAR_INSTALL_DIR is defined in PEAR.php, so you're out of
luck there. :-) Moving it into PHP itself along with a few more
constants (the PEAR installer will need PHP_EXTENSION_DIR, PHP_BINDIR
and PHP_LOCALSTATEDIR) is in my pipeline.
- Stig
--
Stig Sæther Bakken <ssb@fast.no>
Fast Search & Transfer ASA, Trondheim, Norway