|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-27 09:39 UTC] serverprivacy at gmail dot com
[2006-09-22 08:29 UTC] bjori@php.net
[2006-09-22 23:54 UTC] serverprivacy at gmail dot com
[2006-09-23 10:05 UTC] bjori@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Description: ------------ Including a file using a relative path with a "." or "./" fails, giving a "No such file or directory" error. OS: Windows XP Pro SP2 PHP: 5.2.0RC2-dev Web: Apache 2.2.2 Reproduce code: --------------- All files are in the same directory. test1.php <?php include("message.php"); ?> test2.php <?php include("./message.php"); ?> message.php <?php echo "Success"; ?> Expected result: ---------------- test1 and test2 should both produce "Success". Actual result: -------------- test1 is fine. test2 gives the following error message: Warning: include(./message.php) [function.include]: failed to open stream: No such file or directory in C:\Apache\htdocs\test2.php on line 2 Warning: include() [function.include]: Failed opening './message.php' for inclusion (include_path='.;C:\Apache\PHP;C:\Apache\PHP\PEAR;C:\Apache\htdocs') in C:\Apache\htdocs\test2.php on line 2