|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-02 15:06 UTC] bigfaucet at yahoo dot com dot cn
Description: ------------ While use relative path in php files, report error like this Warning: main(./include/common.php): failed to open stream: No such file or directory in D:\www\bbs\index.php on line 19 when change to absolute path, works fine. It happens where change server from windows 2000 server to windows 2003 server and iis5 to iis6 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 03:00:02 2025 UTC |
the code course the errors include require('./include/common.php'); fopen("include/config.inc.php"); ...It seems while disabled ISAPI caching, "require" can use relative path. but file function still not work. the most simply test is like this DOCROOT | |-a.php |-b.php a.php ----- <?php $i = 1; echo $i; ?> b.php ----- <?php file("a.php"); ?> error_reporting's warning is on. where visit b.php Warning: file(a.php): failed to open stream: No such file or directory in D:\www\webroot\b.php on line 2