zf create project FirstProject
在控制台上执行此命令后出现错误
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"
感谢您的帮助。
答案 0 :(得分:2)
我知道你说你已经添加了php和库路径但是如果你能再次确定你的环境变量是正确设置的,那就太好了。
注意:它是zend工具正常工作所需的bin目录。
如果在此之后仍然无法工作,请告诉我,我们可以从那里开始。
变量名称:应设置为
Path
变量值:应包含类似
的链接C:\Zend\ZendServer\share\ZendFramework\bin;
您的链接可能会有所不同,因为我在与默认位置不同的位置安装了Zend Server,并且该框架可以通过“分享”来获得。 。目录
确保你放在那里的链接指向zf.bat(在Windows系统上 - 我相信你正在使用WAMP)所在的目录,你应该可以测试它了吗?仅使用zf命令从命令提示符处工作。
要进入可以更新环境变量的GUI:
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
希望这有帮助,
戴夫
答案 1 :(得分:1)
您收到此消息意味着它在bin中找到zf工具就好了。它的zend库文件的位置没有找到。您必须将/ Zend文件夹从解压缩目录中的/ library / Zend复制到某个位置。首选方法是将/ Zend文件夹直接复制到php / includes文件夹中,这样甚至不需要在php.ini include_path参数中添加任何内容,或者至少必须取消注释。所以移动后dir看起来像/ php / includes / Zend,include_path将是'c:\ php \ includes'
答案 2 :(得分:1)
“所以移动后dir看起来像/ php / includes / Zend,include_path将是'c:\ php \ includes'”
我不是PHP专业开发人员,但是我在上面给出的好解释中注意到Andy给出的,你应该小心设置include_path只用'c:\ php \ includes'而不用'c:\ php \ includes \ Zend'就像我想的那样,直到我测试从路径中取出'Zend'之后才开始工作......希望这很有用。欢呼声。
答案 3 :(得分:0)
尝试这个简单的技巧:
第1步:在Program Files目录中创建一个文件夹,并将其命名为ZendFrameworkCli
。
C:\Program Files\ZendFrameworkCli
第2步:从Zend Framework文件中复制bin
和library
并粘贴到上述目录中。
SEPT 3:设置进入系统设置环境变量的路径。
对于PHP,它将是C:\wamp\bin\php\php5.3.5;
并从客户C:\Program Files\ZendFrameworkCli\bin;