このコードを機能させようとしてきましたが、他のディレクトリのファイル パスが含まれているはずです。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ルート
- htdocs
- www
- index.php
- 芯
- Core.php
- マルハナバチ
- このコードとは関係のない 4 つのディレクトリ (私の知る限り)
主な理由は、このコードを自分で書いていないためです。また、これが少しあいまいな場合は申し訳ありませんが、何か知りたい場合はお気軽にお尋ねください。状況を明確にするために最善を尽くします.
PS Mac で書かれており、Windows でも動作するように編集中です。