In article <[EMAIL PROTECTED]>, "Randy"
<[EMAIL PROTECTED]> wrote:

I would be willing to bet that within the php.ini file, an entry such
as you listed would look for includes in:

if foo = location of php.ini  e.g. /usr/local/lib/php.ini,

then ../include relative to foo is /usr/local/include/

so then include files would look inside /usr/local/include.

>From within your script, include "../test/sample.php" would
look relative to the path setup in php.ini,

so if include dir via php.ini is /usr/local/include/

then include from your script would be /usr/local/test/sample.php/

Anyone care to verify?

Jeff


> I'm confused on what should be a simple issue - where does php look for
> an include file in the following example? My test results seem very
> confusing and the docs never mention it.
> 
> In the program:
>   include "../test/sample.php";
> 
> In php.ini:
>   include_path="../include"
> 
> Does php:
>   A. Look in the dir "../test" for sample.php first and if not found,
>   look in "../include" for sample.php? B. Ignore the dir "../test/" and
>   look in
>   "../include" for sample.php? C. Look in dir "../test" for sample.php
>   and
>   if not found, look in "../include" for "../test/sample.php"? (and
>   can't find it as invalid) D. Look only in dir "../include" for
>   "../test/sample.php"? (and can't find it as invalid)
> 
> Does it work exactly the same for REQUIRE?
> 
> TIA
> 
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to