问题
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