RE: [PHP] include path confusion
| From: | WreckRman2 | Date: | Mon, 08 Jan 2001 19:02:52 +0000 |
| Subject: | RE: [PHP] include path confusion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33284@lists.php.net to get a copy of this message | ||
I use the full path to help fix this problem. This way no matter where you
drop it in, it will work...
<?php include ('/home/sites/home/web/cgi-bin/ads/ad.php');?>
-----Original Message-----
From: Randy [mailto:foxpro@minutemanups.com]
Sent: Monday, January 08, 2001 2:02 PM
To: php-general@lists.php.net
Subject: [PHP] include path confusion
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
--
Best regards,
Randy
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net