2013-05-16 37 views
0

我已经获得了使用Zend的项目的所有权1.11 我在一段时间内没有使用过Zend(更不用说设置它了),而且我遇到了问题还原包括2.4.0至1.11.11xampp 1.8.1 - 还原为zend 1.11

到Zend的唯一的参考是在这里: C:\ XAMPP \ PHP \梨\库\ Zend的

有一些别的地方,可能使我的生活更容易吗? 这甚至可能吗?

回答

1

您可以同时运行ZF1.x和ZF2.x。只需将当前版本的ZF1.12放入您想要的位置,然后将其放在php include_path中,或者将该库放入应用程序的库中即可。 ZF1代码不会尝试使用ZF2组件,反之亦然(它们使用完全不同的名称空间类型)。

例如:

的ZF1.12.3最小当前下载的有提取时,这种结构:

C:\Users 
    \user 
     \Downloads 
      \ZendFramework-1.12.3-minimal 
       \ZendFramework-1.12.3-minimal 
        \bin /*This is where the zf.bat and zf.sh live add this path the windows path variable to use Zend_Tool CLI */ 
        \library 
         \Zend /*This is where the actual code is*/ 

取整\Zend文件夹,并把它:

\project 
    \application 
    \library /*Put the Zend Folder here, it will be automatically included in the app*/ 

或放它在任何你想要的地方,只需将该路径添加到php.ini include_path即可。

这一切都假设Zend Framework应用程序的自动加载器代码中没有任何更改。如果使用默认值不起作用,请发布您的application.inibootstrap.php,因为这些文件通常会包含更改默认值的代码。