I am having a problem with multiple includes.
A.php require_once on two files: B.php then C.php
C.php require_once on B.php again
Then I get a message:
Warning: main(../../B.php): failed to open stream: No such file or
directory in
/home/jkennedy/public_html/foo/php/secure/common/A.php on line
1
Fatal error: main(): Failed opening required '../../B.php'
(include_path='/home/jkennedy/public_html/foo/php/secure:/usr/share/php:/usr/share/php/Smarty-2.6.2/libs:/home/jkennedy/public_html/foo/_php/secure/PEAR')
in /home/jkennedy/public_html/foo/php/secure/common/A.php on
line 1
If I comment out the second require_once of B.php in C.php, the error goes
away and I still get the variables defined in B.php, so I know it is being
included.
My question is why is it failing in the manner that it is doing? From
what I could tell in the manual require_once was supposed to do nothing if
it was already included. And why the "Failed opening", as if the file
didn't exist?
I am using PHP 4.3.4.
--
Justin L. Kennedy
Georgia Institute of Technology, Atlanta Georgia, 30332
Email: jk289@prism.gat ech.edu
A.php require_once on two files: B.php then C.php
C.php require_once on B.php again
Then I get a message:
Warning: main(../../B.php): failed to open stream: No such file or
directory in
/home/jkennedy/public_html/foo/php/secure/common/A.php on line
1
Fatal error: main(): Failed opening required '../../B.php'
(include_path='/home/jkennedy/public_html/foo/php/secure:/usr/share/php:/usr/share/php/Smarty-2.6.2/libs:/home/jkennedy/public_html/foo/_php/secure/PEAR')
in /home/jkennedy/public_html/foo/php/secure/common/A.php on
line 1
If I comment out the second require_once of B.php in C.php, the error goes
away and I still get the variables defined in B.php, so I know it is being
included.
My question is why is it failing in the manner that it is doing? From
what I could tell in the manual require_once was supposed to do nothing if
it was already included. And why the "Failed opening", as if the file
didn't exist?
I am using PHP 4.3.4.
--
Justin L. Kennedy
Georgia Institute of Technology, Atlanta Georgia, 30332
Email: jk289@prism.gat ech.edu
Comment