警告:require_once(includes/EliteScript.php)[function.require-once]:无法打开流:在目录中没有这样的文件或目录 [英] Warning: require_once(includes/EliteScript.php) [function.require-once]: failed to open stream: No such file or directory in

查看:116
本文介绍了警告:require_once(includes/EliteScript.php)[function.require-once]:无法打开流:在目录中没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个基于许可证的脚本,使用SourceGuardian具有有效的许可证.该脚本在客户的旧服务器上运行良好,他雇了我将其迁移到新服务器上.

This is a licence based script and it has a valid licence using SourceGuardian. The script was working fine on client's old server and he hired me to migrate it to the new server.

迁移后,一切正常,但登录区域无效,尝试登录时会出现以下错误

After migrating, everything was working fine but not the login area, when trying to login it gives the follow error

Warning: require_once(includes/EliteScript.php) [function.require-once]: failed to open stream: No such file or directory in /home/sitetalk/public_html/interface/index.php on line 3

Fatal error: require_once() [function.require]: Failed opening required 'includes/EliteScript.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sitetalk/public_html/interface/index.php on line 3

注册工作正常,并且可以在数据库中看到已填充的数据.尝试将其带给脚本开发人员,但自3个月以来没有任何响应.

Registration works fine and can see the filled data in database. Tried to take it to the script developer, but there's no response since 3months.

不知道是什么导致此错误发生.粘贴所显示文件名的部分代码.

Not sure, what causing this error to happen. Pasting the part of code of the shown file names.

EliteScript.php

    <?php
global $config;
global $country_array;
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);
define("ES_VERSION", "7.0.4");
define("ES_SERVER", "http://primary.shadowscripts.com/master/server.php");
define("ES_FLASH", "/includes/graphs/src/lang/my.inc.php");
define("ES_VERIFYDEV", "eth0");
require_once("ShadowScripts.php");
require_once("interface/template.php");
spl_autoload_register(function($class)
    {
    if ($class == "EliteScriptBase")
        {
        return 0;
        }
    if ($class != "FusionCharts_Gen.php")
        {
        $class = preg_replace("/\\_/", "/", $class);
        }
    $class       = preg_replace("/\\\\/", "/", $class);
   ?>

index.php

<?php 
global $es;
global $ui;
global $member_id;
global $base_url;
global $member_url;
global $image_url;
global $admin_url;
require_once("includes/EliteScript.php");
$es = new EliteScript();
$ui = new UserInterface();
$es->RequireMember();
$member_id = $es->GetMemberId();
$base_url = $es->GetConfig("baseUrl");
$member_url = $es->GetConfig("memberUrl");
$image_url = $es->GetConfig("imageUrl");
$f_login_page = $es->GetLoginUIPage();
if( $f_login_page ) 
{
    $ui->ChangePage($f_login_page);
}

$es->DisplayHeader($es->getText("home_window_title"), "member.php");
switch( $_REQUEST["do"] ) 
{
    case "toggle_autorenew":
        toggle_autorenew();
        break;
    default:
        display_main();
}
$es->DisplayFooter();
echo "\r\n\r\n\r\n\r\n\r\n\r\n";
function toggle_autorenew()
{
    global $es;
    global $ui;
    global $member_id;
    global $base_url;
    global $member_url;
    global $image_url;
    global $admin_url;
    $way = $_REQUEST["way"];
    $es->ToggleMembershipAutoRenew($member_id, $way);
    $ui->SetMessage("msg", $es->getText("home_togglerenew_success"));
    $ui->ChangePage($_SERVER["PHP_SELF"]);
}

function display_main()
?>

正如第3行所述,我什么也没编辑.请帮我可以解决的问题.

As it says on line 3, I find nothing to edit. Please help what I can do to fix this.

谢谢

推荐答案

更改此项并检查其是否有效

Change this and check it is working or not

require_once("includes/EliteScript.php");

require_once("../includes/EliteScript.php");

说明 当前代码调用当前directory/includes/EliteScript.php,但是您的文件位于先前目录中,因此您必须添加../,它将包含先前目录中的文件.

Explanation current code calling current directory/includes/EliteScript.php but your file in previous directory so you have to add ../ it will include file from previous directory.

这篇关于警告:require_once(includes/EliteScript.php)[function.require-once]:无法打开流:在目录中没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆