Re: require_once('') relative path problem
| From: | Curt Zirzow | Date: | Thu, 22 Apr 2004 21:25:03 +0000 |
| Subject: | Re: require_once('') relative path problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184302@lists.php.net to get a copy of this message | ||
* Thus wrote Sheeraz fazal (ng@iwerx.vertextek.com):
> Hi,
> I have problem in undertanding the require_once/require/include/include_once
> functionality. Php files in my project are located in different folders.
> Some folders have common files for other files. And file layout is like this
Include files relative to your include_path
Web Directory:
/home/user/public_html/
Include Directories:
/home/user/phpinclude/test/
/home/user/phpinclude/globals/
php.ini (or similar):
include_path = /home/user/phpinclude:/usr/local/lib/php
public_html/page.php:
<?php
require_once('test/db.php');
?>
db.php:
<?php
require_once('globals/global.php');
?>
Curt
--
"I used to think I was indecisive, but now I'm not so sure."