0
    Error: [2] require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory

/var/www/vhosts/localhost/httpdocs/public.:./var/www/vhosts/localhost/httpdocs/public/../library:./var/www/vhosts/localhost/httpdocs/public/../model:.


defined('SITE_ROOT') ? null : define('SITE_ROOT',$_SERVER['DOCUMENT_ROOT']);

$includePath[] = '.';
$includePath[] = '.' . SITE_ROOT . '/../library';
$includePath[] = '.' . SITE_ROOT . '/../model';
$includePath[] = get_include_path();
$includePath = implode(PATH_SEPARATOR,$includePath);
set_include_path($includePath);




require_once 'Zend/Loader/Autoloader.php';

set_include_pathを正しく設定するのを手伝ってください。

4

1 に答える 1

2

次のような行を使用しています:

$includePath[] = '.' . SITE_ROOT . '/../library';

このようなinclude_pathを取得します:

./var/www/vhosts/localhost/httpdocs/public/../library

そのパスの最初にあることに注意してください.-私はそれがそこにあるべきではないと推測しています。

.各パスの先頭にあるものを削除してみてください:

$includePath[] = '.';
$includePath[] = SITE_ROOT . '/../library';
$includePath[] = SITE_ROOT . '/../model';
$includePath[] = get_include_path();
$includePath = implode(PATH_SEPARATOR,$includePath);
set_include_path($includePath);


詳細情報:.UNIXパスのAは、「現在のディレクトリ」を意味します。/パスの先頭にあるaは、「サーバーのルート」を意味します

したがって、のようなパスは、./var/www実際には「現在のディレクトリ内にあるディレクトリwww内にあるディレクトリvar」を意味します。

そして、おそらく「サーバーのルートにあるディレクトリ内にあるディレクトリ」のようなものが必要です。wwwvar

于 2010-02-27T11:34:33.930 に答える