|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-10-18 17:01 UTC] clarkke8 at yahoo dot com
[2012-04-13 20:55 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: nikic
[2012-04-13 20:55 UTC] nikic@php.net
[2012-04-14 03:01 UTC] aharvey@php.net
-Status: Closed
+Status: Wont fix
-Assigned To: nikic
+Assigned To:
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
Description: ------------ Php 4.3.4 still has this the issue reported in bugs #11326 and #9673. Even though #11326 lists it as fixed in (CVS/4.0.7). Did the behavior change again? Is there a switch somewhere I'm missing? If not, would it be possible to add a switch (or another function) so that includes could be based on the file calling the include? Reproduce code: --------------- //index.php in ./ include_once("./include/A.class.php"); $a = new A(); echo $a->printer(); //A.class.php in ./include include_once("./B.class.php"); class A { function printer() { $b = new B(); return $b->printer(); } } //B.class.php in ./include class B { function printer() { return "did it work?"; } } Expected result: ---------------- did it work? Actual result: -------------- Warning: main(./B.class.php): failed to open stream: No such file or directory in /Users/schapht/Sites/test/ include/A.class.php on line 3 Warning: main(): Failed opening './B.class.php' for inclusion (include_path='.:/usr/local/lib/php') in / Users/schapht/Sites/test/include/A.class.php on line 3 Fatal error: Cannot instantiate non-existent class: b in /Users/schapht/Sites/test/include/A.class.php on line 7