On Fri, 19 Jan 2001, Noah Spitzer-Williams wrote:
> my problem is i have an include file in a parent directory which includes
> other files. i want these other files to be in the same directory as this
> parent directory file..(hope your gettin me here...). the prob is the parent
> directory file looks for its include files in the current directory.
>
> example:
> current path is:
> www.blah.com/blahdir
>
> a file in blahdir called blah1.php includes blah2.php which is located in
> www.blah.com
> blah2.php includes blah3.php and blah4.php which are also located in
> www.blah.com
> the problem is blah2.php looks for blah3.php and blah4.php in
> www.blah.com/blahdir
>
> will chdir() fix this? or is there another way?
>
> Thanks!!
>
> - Noah
>
Two solutions come to mind:
1) Use a variable to store the directory you want to include from.
2) Use absolute paths.
--
Ignacio Vazquez-Abrams <[EMAIL PROTECTED]>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]