Failed to open stream:no such file or directory problem Daquan _php tutorial

Source: Internet
Author: User
Tags pear
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.