Re: I am totally nuts/banana. Please somebody help me with an include problem.

From: Date: Mon, 12 Jan 2004 16:14:27 +0000
Subject: Re: I am totally nuts/banana. Please somebody help me with an include problem.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-174333@lists.php.net to get a copy of this message
Webmaster wrote:
Hello, please can somebody help me. I am going nuts. Really I am close to totally freaking out. I have a problem that seems minor and ridiculous but cost me already 3 working days. I have a working php/mysql homepage and used to use Ommnihttpd until 3 days ago. I installed the latest versions of Apache and php4 3 days ago on Windows 2000. No matter what I do my script can not include another file from a directory on the same level in the directory tree. I have the following directory structure: c:\webpage\classes\_dentonaproject\page_dentona.class.php c:\webpage\classes\design\page.class.php In the file page_dentona.class.php the first line says the following: require_once('../design/page.class.php');
You should realize that the base directory is the one where the script called by the browser resides. If you have file c:\webpage\index.php that contains require_once('classes/_dentonaproject/page_dentona.class.php'); then in page_dentona.class.php you should still use require_once('classes/design/page.class.php'); The working directory is c:\webpage\ in this case. Hope this will help you. Marek

« previous php.general (#174333) next »