1

我试图通过扩展将 Zend 框架包含到 Yii 中。问题是这样的:

Warning: include(EZendAutoloader.php): failed to open stream

索引.php:

// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';

// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

require_once($yii);

EZendAutoloader::$prefixes = array('Zend');

Yii::import("ext.yiiext.components.zendAutoloader.EZendAutoloader", true);
Yii::registerAutoloader(array("EZendAutoloader", "loadClass"), true);


$app= Yii::createWebApplication($config);
$app->run();

EZendAutoloader::$prefixes = array('Zend');可以在导入之前吗?我也试图改变 Yii:import 的论点,但没有运气。

4

0 回答 0