0

我通过启动指南设置了一个可用的 ZF2,并决定将其移植到我的新站点。我一直调试到 init_autoloader.php 中的 is_dir 并且想知道是否有人知道可能出了什么问题。这是我的代码:

// Composer autoloading
$loader = include 'vendor/autoload.php';

$zf2Path = false;

if (is_dir('vendor/zendframework/zendframework/library')) {
    die('hello'); //This die does not execute
    $zf2Path = 'vendor/zendframework/zendframework/library';
} elseif (getenv('ZF2_PATH')) {      // Support for ZF2_PATH environment variable or git submodule
    die('hello1'); //This die does not execute either
    $zf2Path = getenv('ZF2_PATH');
} elseif (get_cfg_var('zf2_path')) { // Support for zf2_path directive value
    die('hello2'); //Nor this one
    $zf2Path = get_cfg_var('zf2_path');
}

所以没有一个骰子执行,但如上所述,这段代码在我的本地运行良好,具有完全相同的结构。

4

0 回答 0