Failed to open stream:no such file or directory problem Daquan, this article by the help of the small collection and collation, please retain the source when reproduced.
Case one:
(Failed to open stream:no such file or directory) the directory permissions in the PHP environment configuration under IIS cause an error
Causes and solutions:
Configuring the Environment for IIS + PHP
If you are sure that your program will work in another environment, except for IIS under win, there is an error similar to the following:
Warning:main (./config.php): Failed to open stream:no such file or directory in D:\wwwroot\Demo\Config.php on line 13
Fatal Error:main (): Failed opening required './config.php ' (include_path= '.; C:\php4\pear ') in D:\wwwroot\Core\Config.php on line 13
This problem is mainly due to the win NTFS disk in addition to the Everyone permissions caused by the security permissions to add an Internet Guest account is resolved.
How to: Add User iusr_xxxxx OK, properties-----disk
Case TWO:
The problem is:
Warning:require_once (.. /lib/dbutil.class.php) [Function.require-once]: failed to open stream:no such file or directory in E:\phppro\dxh\service\ ExpertService.class.php on line 2
Fatal error:require_once () [function.require]: Failed opening required '. /lib/dbutil.class.php ' (include_path= '); C:\php5\pear ') in E:\phppro\dxh\service\ExpertService.class.php on line 2
Workaround:
1. Add DirName (__file__) when require, like this: require_once (dirname (__file__). " /.. /lib/dbutil.class.php ");
2. Understand the require_once example as follows:
Copy to ClipboardWhat to refer to: [www.bkjia.com] If b.php is referenced by a a.php file require or include in another directory
Require_once ("./c.php"); is actually called the c.php in the a.php directory
Require_once (DirName (__file__). " /c.php "); is actually called the c.php in the b.php directory
Require_once ("c.php"); is actually called the c.php in the b.php directory
?>
Case THREE:
Run PHP Web site, error, the content is as follows:
Warning:Unknown:failed to open stream:no such file or directory in Unknown on line 0
Fatal error:Unknown:Failed opening required ' e:/php/www/mrsoft/Register login Module/index.php ' (include_path= '.; C:\php5\pear ') in Unknown on line 0
File structure:
Workaround:
Apache can not parse the "Register login module" in the Chinese URL, it can be changed to English path.
http://www.bkjia.com/PHPjc/363896.html www.bkjia.com true http://www.bkjia.com/PHPjc/363896.html techarticle failed to open stream:no such file or directory problem Daquan, this article by the Fire Network small collection and collation, please retain the source when reproduced. Case one: (Failed to open stream:no such f ...