Re: include path confusion
| From: | Randy | Date: | Tue, 09 Jan 2001 15:33:34 +0000 |
| Subject: | Re: include path confusion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33468@lists.php.net to get a copy of this message | ||
I've done that too, but it's a real pain.
Does anyone know how php searches for include files?
Does everyone use the entire path?
Best regards,
Randy
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:foxpro@minutemanups.com]
W> Sent: Monday, January 08, 2001 2:02 PM
W> To: php-general@lists.php.net
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: php-general-unsubscribe@lists.php.net
W> For additional commands, e-mail: php-general-help@lists.php.net
W> To contact the list administrators, e-mail: php-list-admin@lists.php.net