如何在Zend Framework中设置第一个应用程序2 [英] How to setup First Application in Zend Framework 2

查看:124
本文介绍了如何在Zend Framework中设置第一个应用程序2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在zf2中创建我的第一个应用程序。
i后跟Zend Offical网站 zf2骷髅应用程序。从github下载骨架应用程序,如在给定的链接。当我提取它,并把它放在我的文件夹,并运行它显示此致命错误

 致命错误:未捕获异常RuntimeException,消息为无法加载ZF2。 

中运行`php composer.phar install`或定义一个ZF2_PATH环境变量'D:\projects\zf2\zf2_app\init_autoloader.php:50堆栈跟踪:#0 D: \projects\zf2\zf2_app
\public\index.php(9):require()#1 {main}抛出在D:\projects\zf2\zf2_app
\init_autoloader.php on line 50

我不知道如何解决这个问题



这是什么?

 要在我们的应用程序中安装Zend Framework 2类型:
php composer.phar self-update
php composer.phar install

在哪里键入这些命令?
帮助我的第一个ZF2应用程序

解决方案

您应该打开一个cmd窗口并将目录更改为您的项目。然后需要键入以下内容:

  php composer.phar install 
pre>

这将安装Zend Skeleton Application - ZF2的所有库依赖。


i am creating my first application in zf2. i followed Zend Offical website zf2 Skeleton Application.i have downloaded the skeleton app from github as in in the given link.when i extract it and put that in my folder and run it its showing this Fatal Error

 Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2. 
 Run  `php composer.phar install` or define a ZF2_PATH environment variable.' in 
 D:\projects\zf2\zf2_app\init_autoloader.php:50 Stack trace: #0 D:\projects\zf2\zf2_app
 \public\index.php(9): require() #1 {main} thrown in D:\projects\zf2\zf2_app
 \init_autoloader.php on line 50

i dont know How to fix this??

and what about this?

To install Zend Framework 2 into our application we simply type:
  php composer.phar self-update
  php composer.phar install

where to type these commands? Help me with my first ZF2 app

解决方案

You should open a cmd window and change directory to your project. You then need to type the following:

php composer.phar install

This will install all the library dependencies for the Zend Skeleton Application - ZF2 in this case.

这篇关于如何在Zend Framework中设置第一个应用程序2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆