|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-03 04:13 UTC] edink@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 13:00:01 2025 UTC |
After upgrading from PHP 4.1.1 (Apache 1.3.x) to PHP 4.2.3 (Apache 2.0.42), file_exists() obviously changed its behaviour: it does no longer find files in the current directory. I need to supply the full path. I use the same php.ini, and I did not find any hints in the ChangeLog, so I presume this is a bug. The current directory '.' is in the include path, and require() as well as include() work. I am not using safe mode. Example: if(file_exists("functions.inc.php")) { include_once("functions.inc.php"); } else die ("File not found"); does not work, whereas if(file_exists(getcwd()."/functions.inc.php")) { include_once("functions.inc.php"); } else die ("File not found"); works. Note that it is not necessary to specify the full path in include_once()! Also require("functions.inc.php") would work as expected. If you should have a work around or a fix, please let me know.