Php 在zendframework 2中使用zendframework 1库
我是Zend的新手,也是我想在ZF2应用程序中使用的新手 但问题是ZF1内置了,而我的应用程序是在ZF2中 我有在ZF2中使用ZF1库的检查解决方案,但它不适合我 在Php 在zendframework 2中使用zendframework 1库,php,zend-framework,zend-framework2,matomo,Php,Zend Framework,Zend Framework2,Matomo,我是Zend的新手,也是我想在ZF2应用程序中使用的新手 但问题是ZF1内置了,而我的应用程序是在ZF2中 我有在ZF2中使用ZF1库的检查解决方案,但它不适合我 在if($zf2Path){语句: if ($zf2Path && !class_exists('Zend\Loader\AutoloaderFactory')) { if (isset($loader)) { $loader->add('Zend', $zf2Path);
if($zf2Path){语句:
if ($zf2Path && !class_exists('Zend\Loader\AutoloaderFactory')) {
if (isset($loader)) {
$loader->add('Zend', $zf2Path);
$loader->add('ZendXml', $zf2Path);
} else {
include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
'autoregister_zf' => true,
)
));
}
}
我已经改变了if($zf2Path){语句:
init_autoloader.php的一部分,如下所示
if ($zf2Path && !class_exists('Zend\Loader\AutoloaderFactory')) {
if (isset($loader)) {
$loader->add('Zend', $zf2Path);
$loader->add('ZendXml', $zf2Path);
} else {
include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
set_include_path(implode(PATH_SEPARATOR, array($zf1Path, get_include_path())));
Zend\Loader\AutoloaderFactory::factory(array(
'Zend\Loader\StandardAutoloader' => array(
'autoregister_zf' => true,
'prefixes' => array(
'Zend_' => $zf1Path . '/Zend'
),
)
));
}
}
有人能帮我吗?这里有一个Zend Framework 2集成: