|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-28 22:35 UTC] kjarli at gmail dot com
[2008-06-29 02:22 UTC] crrodriguez at suse dot de
[2008-06-29 12:29 UTC] kjarli at gmail dot com
[2008-07-01 09:43 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 13:00:01 2025 UTC |
Description: ------------ Using some custom include paths does probably not effect file_exists Reproduce code: --------------- <?php // stripped down code of that what I'm using // create a file: $rootPath/library/Berg/file.php you want to check // this below is $rootPath/application/bootstrap.php $rootPath = dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR; set_include_path($rootPath . 'library' . PATH_SEPARATOR . get_include_path()); var_dump(file_exists('Berg/file.php')) . '<br />'; // result false var_dump(file_exists($rootPath . '/library/file.php')) // result true require('Berg/file.php'); // works require($rootPath . '/library/file.php'); // works ?> Expected result: ---------------- I expect both var_dumps to return true Actual result: -------------- The one using the include path (or actually does not) gives false instead of true.