Does this mean that of all of the people on this list, NOBODY
understands how php searches for include files? Surely somebody
knows!

How I think it SHOULD work is like DOS - First it looks at where
you say it is. If not there, it looks in the current directory.
If not there, it looks in the directories in the path. I'm sure
PHP doesn't work this way, but I can't figure out how it does
work.

Please, if anybody understands this, let me know.

Thanks!

Best regards,
 Randy   


Tuesday, January 09, 2001, 9:33:34 AM, you wrote:

R> I've done that too, but it's a real pain.

R> Does anyone know how php searches for include files?

R> Does everyone use the entire path?

R> Best regards,
R>  Randy   


R> Monday, January 08, 2001, 1:02:52 PM, you wrote:

W>> I use the full path to help fix this problem. This way no matter where you
W>> drop it in, it will work...

W>> <?php include ('/home/sites/home/web/cgi-bin/ads/ad.php');?>

W>> -----Original Message-----
W>> From: Randy [mailto:[EMAIL PROTECTED]]
W>> Sent: Monday, January 08, 2001 2:02 PM
W>> To: [EMAIL PROTECTED]
W>> Subject: [PHP] include path confusion


W>> I'm confused on what should be a simple issue - where does php
W>> look for an include file in the following example? My test
W>> results seem very confusing and the docs never mention it.

W>> In the program:
W>>   include "../test/sample.php";

W>> In php.ini:
W>>   include_path="../include"

W>> Does php:
W>>   A. Look in the dir "../test" for sample.php first and if not found,
W>>   look in "../include" for sample.php?
W>>   B. Ignore the dir "../test/" and look in "../include" for
W>>   sample.php?
W>>   C. Look in dir "../test" for sample.php and if not found, look
W>>   in "../include" for "../test/sample.php"? (and can't find it as
W>>   invalid)
W>>   D. Look only in dir "../include" for "../test/sample.php"? (and
W>>   can't find it as invalid)

W>> Does it work exactly the same for REQUIRE?

W>> TIA
W>> --
W>> Best regards,
W>>  Randy



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



-- 
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