New to PEAR -require_once / include_once is strange...
| From: | Edward Z. Yang | Date: | Tue, 22 Mar 2005 21:48:36 +0000 |
| Subject: | New to PEAR -require_once / include_once is strange... | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18246@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've just started taking a look at PEAR, at it sounds really
interesting. However, there's one thing in the documentation that
baffles me:
require_once "Auth.php";
I could not understand how that worked, and whether or not it would
work. Further delving led to this:
ini_set("include_path", '/var/www/www.example.com/includes/' .
PATH_SEPARATOR . ini_get("include_path"));
At this point, I've got some vague idea about how require works with
files when it has no parenthesese, but I'm still confused on why exactly
it works: If I were to install a PEAR package outside of this include
directory, would I have to point my include to that file? Why does
simply saying the first statement work? Thanks in advance for the help.
- --
Edward Z. Yang Personal: edwardzyang@thewritingpot.com
SN:Ambush Commander Website: http://www.thewritingpot.com/
GPGKey:0x869C48DA http://www.thewritingpot.com/gpgpubkey.asc
3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFCQJK0qTO+fYacSNoRArYfAKCGaFT5AbLYkfvpZnpklQs1wo6uFACbBlbK
o1j9rjlcB6/ouv8MaGk6IhI=
=YjQL
-----END PGP SIGNATURE-----