How to create controller using command prompt in zend framework

ⅰ亾dé卋堺 提交于 2019-12-25 00:52:44

问题


I am new to zend framework.I have placed my bin and library folder in :

C:\xampp\htdocs\zend

and have created project using command prompt.

C:\xampp\htdocs\zend\bin> zf create project zendtest

its creating project zendtest in folder -> C:\xampp\htdocs\zend\bin\

C:\xampp\htdocs\zend\bin>cd zendtest

but when i tried to create module

C:\xampp\htdocs\zend\bin\zendtest> zf create module testmodule

its saying 'zf' is not recognised as internal or external command .

On creating controller also giving same error.

How to solve this issue.


回答1:


You need to add it to your system's PATH. Take a look here:

http://framework.zend.com/manual/en/zend.tool.extending.html#zend.tool.extending.zend-tool-framework.cli-client.setup-windows

Should be as simple as adding the path to your Zend Framework's bin folder to the PATH, and you should be set.




回答2:


First you have to go to your project path and then move to path from where your command will run

c:\xampp\htdocs\project_name>..\Zend\bin\zf.bat create module module_name



来源:https://stackoverflow.com/questions/10083705/how-to-create-controller-using-command-prompt-in-zend-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!