zend 框架 zf 命令不起作用 [英] zend framework zf command not working

查看:28
本文介绍了zend 框架 zf 命令不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

m 使用 wamp 和 zend 框架.首先,我安装了 wamp localhost 工作正常.下载 Zend 框架.在windows的环境变量中添加了php路径,zend库路径.启用重写模块并在 php.ini 中设置包含路径我在 phpinfo 文件中得到了正确的结果.在此之后我尝试执行

m using wamp and zend framework. firstly i had installed wamp localhost working fine then. downloaded Zend framework. added php path, zend library path in environment variable of windows. enabled rewrite module and set include path in php.ini which i get correct in phpinfo file. after this m trying to execute

zf create project FirstProject

在控制台上执行此命令后,我收到错误

after this command on console i get an error

In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path.  There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.

The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup".  This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.

To change the setup of this tool, run: "zf --setup"

提前感谢您的帮助.

推荐答案

我知道你说过你已经添加了 php 和库路径,但如果你能再次确保你的环境变量定义正确,那就太好了.

I know you said you've added the php and library path but if you could make sure again that the your environment variables are definitley set correctly that would be great.

注意:它是 zend 工具正常工作所需的 bin 目录.

如果在此之后仍然无法工作,请告诉我,我们可以从那里开始.

If still not working after this let me know and we can go from there.

变量名:应该设置为

Path

和变量值:应该包含一个链接

And the Variable value: should contain a link like

C:\Zend\ZendServer\share\ZendFramework\bin;

您的链接可能会有所不同,因为我将 Zend Server 安装在与默认位置不同的位置,并且该框架可通过共享"目录获得.

Your link is likely to be different as I installed Zend Server in a different location from default and the framework is available through the 'share' directory.

确保您放在那里的链接指向 zf.bat(在 Windows 系统上 - 我相信您正在使用 WAMP)所在的目录,并且您应该能够从命令提示符使用只是 zf 命令.

Make sure the link you put in there points to the directory that the zf.bat (on a Windows system - I believe you're using WAMP) lives in and you should be able to test it's working from a command prompt using just the zf command.

进入可以更新环境变量的 GUI:

To get to the GUI where you can update the environment variables:

1) Right click on the Computer icon on your Desktop and choose Properties option.
2) In the System window click on Advanced system settings in the left pane
3) In the System Properties window select Advanced tab and click on Environment Variables
4) In the Environment Variables window you will notice two columns - User variables for a username and System variables
5) In the System variables section scroll down to 'Path' and then highlight it and click 'Edit'
6) At the end of the last entry place a ; character and then paste the path to the ZendFramework\bin on your system like above

希望这会有所帮助,

戴夫

这篇关于zend 框架 zf 命令不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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