0

我一直试图让这段代码工作,它应该包含我其他目录的文件路径。我在 Xampp 服务器上运行它,但是每次我尝试打开 www/index.php 从 Xampp (php_error_log) 读取错误日志后,我都会收到 HTTP 500 错误(内部服务器错误),这就是回来:

PHP Fatal error:  require_once(): Failed opening required 'core/Core.php' (include_path='.;\xampp-portable\php\PEAR.') in C:\xampp-portable\htdocs\www\index.php on line 21

参考代码是:

<?php

/**
 * bootstrap: instantiates Core
 * all requests are routed through this file
 */

error_reporting(E_ALL);

ini_set('url_rewriter.tags', '');
ini_set('display_errors', 'off');
ini_set('memory_limit', '128M');
set_include_path(get_include_path() .':'. realpath(dirname(__FILE__) . '/../bumblebee' . ':'));

define('PAYMENT_TEST', false);
define('C2C_BETA', false);
define('USE_SSL', true);

session_start();

require_once('.;/core/Core.php');
new Core();

?>

下面是我的目录设置:

  • Xampp 根
    • 文档
    • 万维网
      • 索引.php
      • 核心.php
    • 熊蜂
    • 还有 4 个目录与这段代码没有任何关系(据我所知)

我现在在黑暗中奔跑,主要是因为我没有自己编写这段代码。也很抱歉,如果这一切有点模糊,如果您想知道一些事情,请随时问我会尽力澄清情况。

PS 它是在 mac 上编写的,我现在正在编辑它以在 windows 上工作。

4

0 回答 0