Re: [PHP] Nested include/require not working in 5.2
- From: jochem@xxxxxxxxxxxxx (Jochem Maas)
- Date: Tue, 27 Nov 2007 17:46:01 +0100
Mike Yrabedra wrote:
I am not able to use includes or requires in nested files using php 5.2.3
(osx)
Including or Requiring files directly works.
Including files, that also have includes in them, does not.
Say you have this...
-TopDirectory
--index.php (contains include("includes/top.php"); )
--includes (folder)
---config.php (contains echo "crap"; )
---top.php (contains include("config.php"); )
When you load the index.php file you would expect the word "crap" to show,
but it does not. I think the getcwd is staying specific to the top folder,
so the path stays the same throughout.
This does not happen in 5.1.6
nothing changed in php - the CWD has always been the dir in which the explicitly
called script lives in and it does not change because your inside an included file.
my guess is your include_path no longer includes '.' so php is not trying to find the file
in the directory of the script which is doing the include.
.
Is there a fix for this or is it PHP causing the problem?
- Follow-Ups:
- Re: [PHP] Nested include/require not working in 5.2
- From: Mike Yrabedra
- Re: [PHP] Nested include/require not working in 5.2
- References:
- Nested include/require not working in 5.2
- From: Mike Yrabedra
- Nested include/require not working in 5.2
- Prev by Date: Nested include/require not working in 5.2
- Next by Date: RE: [PHP] Re: Newbie asks about multi-lingual website strategies
- Previous by thread: Nested include/require not working in 5.2
- Next by thread: Re: [PHP] Nested include/require not working in 5.2
- Index(es):
Relevant Pages
|