Zend_Tool is a good tool for creating ZF projects. Zend_tool can be used to create the projects of our ZF project.
Zend_Tool is a good tool for creating ZF projects. you can use Zend_tool to create the directory structure of our ZF project!
1. Zend_Tool installation process (For Windows ):
(1) create a folder named ZendFrameworkCli under C: Program Files;
(2) copy the bind and library files in the decompressed ZF file package to the ZendFrameworkCli folder;
(3) add the directory C: Program FilesZendFrameworkClibin to the system environment variable: [My Computer]-> [Properties]-> [advanced]-> [environment variables]-> path in system variables; double-click it and add it at the end of the system variable value; C: program FilesZendFrameworkClibin;
(4) after installation, restart the computer.
(5) run the command line: enter Cmd and enter zf show version to view your current zf version.
2. use of Zend_Tool:
(1) go to the root directory of your website (which is entered by the cd command );
(2) create a project named ZF_Project1.10.6. now you can see that the most basic website root directory has been created under the root directory of your website:
- Zf create project ZF_Project1.10.6
Copy code
(3) Create a Module named shop. (if a module named shop has been created, you can directly delete it, if you use zend_tool again, the system will prompt that the module shop already exists. the solution is to find one in the project. zfproject. xml file, delete .. This section ):
Copy code
(4) Create a controller named Index under the shop Module (here 1 stands for Module, shop stands for Module name, if you do not add 1, the content is created in the application/controllers folder by default ;):
- Zf create controller Index 1 shop
Copy code
(5) create an action named list under IndexController under shop Module:
- Zf create action list Index 1 shop
Copy code
(6) create a shop model under Shop Moduel:
Copy code
(7) create a shop form under Shop Moduel;
Copy code
(8) layout:
Copy code
Of course, this is the most basic operation. these operations can also be performed in the Zend Studio editor. the Zend_Tool is more convenient in creating the directory structure. if you do not like this, you can also manually create folders and files one by one, but the Zend_Tool layout is easier. when you create a controller named Shop, it also helps you create a shop folder under Views/Scripts/and explore more things !!!