i didn't quite get when you ment by that but have you tried using $DOCUMENT_ROOT before your path, that might help it will be something like this
require_once('$DOCUMENT_ROOT/test/db.php');
$DOCUMENT_ROOT goes to your first folder that shows up online (where your index page is)
From: "Sheeraz fazal" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: [PHP] require_once('') relative path problem Date: Thu, 22 Apr 2004 14:34:23 -0600
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
/* File: a.php */ require_once('../test/db.php'); ...
/* File: db.php */ require_once('../globals/global.php'); ...
when i include a.php in another file i get error for global.php file that path could not be found. And if i correct the path in db.php then someother file which is using db.php will get error. So, can someone elaborate that how relative path works in require_once. what is the starting directory for require_once function which is using relative path.
Or
Is there any way that i can included some constant which include the absolute path from which all relative paths can be determined?
Comments welcome.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Lose those love handles! MSN Fitness shows you two moves to slim your waist. http://fitness.msn.com/articles/feeds/article.aspx?dept=exercise&article=et_pv_030104_lovehandles
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php