访问首页出现如下错误:
------------------------------------------
Warning: require_once(MYMPS_INC/class.fun.php) [function.require-once]: failed to open stream: No such file or directory in 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,都是默认。程序是从别的服务器迁移过来的。我猜测MYMPS_INC这个变量可能没有获得。请各位指点。
回复讨论(解决方案)
1.检查 D:\Hosting\10016727\html\include\MYMPS_INC\ 文件夹里是不是有文件 class.fun.php ?
最好改成 require_once(dirname(__FILE__) .'/MYMPS_INC/class.fun.php');
2.检查MYMPS_INC的读写权限。
打开D:\Hosting\10016727\html\include\global.php第62行
在第61行写入:
Echo '
',Var_Dump(第62行要require_once的路径和文件名),'';
Die();
这样即可输出要require的文件和路径了,然后你看一下你的程序里这个文件是否存在.
路径不对。。
1.检查 D:\Hosting\10016727\html\include\MYMPS_INC\ 文件夹里是不是有文件 class.fun.php ?
最好改成 require_once(dirname(__FILE__) .'/MYMPS_INC/class.fun.php');
2.检查MYMPS_INC的读写权限。
这个文件是存在的,MYMPS_INC是个变量,这段代码是在/inlcude/global.php里,但是我查了变量是在/box.php里面定义的。如果MYMPS_INC没有赋值或者没有定义,MYMPS_INC就作为字符串处理吗?
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');
---------------------------------
这是变量定义吗?
这样即可输出要require的文件和路径了,然后你看一下你的程序里这个文件是否存在.
输出:string(23) "MYMPS_INC/class.fun.php"
但是MYMPS_INC是个变量,应该是类似于“./include”的地址啊,为什么是这个路径?
这样即可输出要require的文件和路径了,然后你看一下你的程序里这个文件是否存在.
能不能亲自指导一下?
你的???了,看来这不是一个变量,应该是一个常量才对
写法应该是
require_once(MYMPS_INC.'/class.fun.php');
如果是变量的话,写法应该是
require_once($MYMPS_INC.'/class.fun.php');
顺便提一下,如果你对自己的程序有十足的把握,请不要使用???_once这种引用方式.
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');
----------------------------
上面是在box.php里定义的'MYMPS_INC',这是定义常量吗?我对php不是很懂?这个是买的代码,不是自己写的。请问能不能能不能帮助调试一下?

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Laravel's service container and service providers are fundamental to its architecture. This article explores service containers, details service provider creation, registration, and demonstrates practical usage with examples. We'll begin with an ove

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Linux new version
SublimeText3 Linux latest version

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function