如何在 Zend Framework 2 中设置第一个应用程序 [英] How to setup First Application in Zend Framework 2
问题描述
我正在 zf2 中创建我的第一个应用程序.我关注了 Zend 官方网站 zf2 Skeleton Application.我已经从给定链接中的 github 下载了骨架应用程序.当我将其解压缩并将其放入我的文件夹并运行它时,它会显示此致命错误
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:projectszf2zf2_appinit_autoloader.php:50 Stack trace: #0 D:projectszf2zf2_app
publicindex.php(9): require() #1 {main} thrown in D:projectszf2zf2_app
init_autoloader.php on line 50
我不知道如何解决这个问题??
i dont know How to fix this??
这个呢?
To install Zend Framework 2 into our application we simply type:
php composer.phar self-update
php composer.phar install
在哪里输入这些命令?帮助我开发我的第一个 ZF2 应用
where to type these commands? Help me with my first ZF2 app
推荐答案
您应该打开一个 cmd 窗口并将目录更改为您的项目.然后您需要输入以下内容:
You should open a cmd window and change directory to your project. You then need to type the following:
php composer.phar install
这将安装 Zend Skeleton 应用程序的所有库依赖项 - 在本例中为 ZF2.
This will install all the library dependencies for the Zend Skeleton Application - ZF2 in this case.
这篇关于如何在 Zend Framework 2 中设置第一个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!