Windows host runs php:failed to open stream:no such file or directory

Source: Internet
Author: User
This post was last edited by kid1234567 on 2013-08-02 20:22:13

The following error occurred on the access page:
------------------------------------------
Warning:require_once (mymps_inc/class.fun.php) [Function.require-once]: failed to open stream:no such file or directory I n D:\Hosting\10016727\html\include\global.php on line 62

Fatal error:require_once () [function.require]: Failed opening required ' mymps_inc/class.fun.php ' (include_path= '); C:\php5\pear ') in D:\Hosting\10016727\html\include\global.php on line 62
------------------------------------------
PHP.ini is not configured, it is the default. The program is migrated from another server. I guess mymps_inc this variable may not be available. Please advise.


Reply to discussion (solution)

1. Check the D:\Hosting\10016727\html\include\MYMPS_INC\ folder is there a file class.fun.php?
It is better to change to Require_once (DirName (__file__). /mymps_inc/class.fun.php ');
2. Check the Read and write permissions of the Mymps_inc.

Open D:\Hosting\10016727\html\include\global.php Line 62nd
Write in line 61st:

Echo '

', Var_dump (62nd line to require_once the path and file name), '
';
Die ();

This will output the files and paths to be require, and then you can see if the file exists in your program.

The path is not correct.

1. Check the D:\Hosting\10016727\html\include\MYMPS_INC\ folder is there a file class.fun.php? The
is best changed to Require_once (DirName (__file__). /mymps_inc/class.fun.php ');
2. Check the Read and write permissions of the Mymps_inc.

This file exists, Mymps_inc is a variable, this code is in/inlcude/global.php, but I checked the variables are defined in the/box.php. If Mymps_inc is not assigned or undefined, is mymps_inc treated as a string?

box.php:
---------------------------
__file__ = = ' && die (' Fatal error code:0 ');

Define ("In_mymps", true);
define (' MAGIC_QUOTES_GPC ', GET_MAGIC_QUOTES_GPC ());
Define ("Mymps_root", DirName (__file__));
define (' Mymps_data ', mymps_root. /data ');
define (' Mymps_inc ', mymps_root. /include ');
define (' Mymps_smarty ', mymps_inc. '/smarty ');
define (' Mymps_tpl ', mymps_root. /template ');
define (' Mymps_ass ', mymps_root. /include/assign ');
---------------------------------
Is this a variable definition?

This will output the files and paths to be require, and then you can see if the file exists in your program.

Output: String ("mymps_inc/class.fun.php")
But Mymps_inc is a variable, it should be an address similar to "./include" Ah, why this path?

This will output the files and paths to be require, and then you can see if the file exists in your program.

Can you guide me personally?

Yours??? , it seems that this is not a variable, it should be a constant to
The wording should be
Require_once (mymps_inc. '/class.fun.php ');
If it is a variable, the wording should be
Require_once ($MYMPS _inc. '/class.fun.php ');

By the way, if you have a full grasp of your program, do not use??? _once this way of quoting.

Define ("In_mymps", true);
Define (' MAGIC_QUOTES_GPC ', GET_MAGIC_QUOTES_GPC ());
Define ("Mymps_root", DirName (__file__));
Define (' Mymps_data ', mymps_root. /data ');
Define (' Mymps_inc ', mymps_root. /include ');
Define (' Mymps_smarty ', mymps_inc. '/smarty ');
Define (' Mymps_tpl ', mymps_root. /template ');
Define (' Mymps_ass ', mymps_root. /include/assign ');
----------------------------
Above is the definition of ' mymps_inc ' in box.php, is this a constant? I don't know PHP very well. This is the code to buy, not to write it yourself. Could you please help me with the debugging?

  • 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.