Install and use ZendTool

Source: Internet
Author: User
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 ):

  • Zf create module shop

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:

  • Create model Shop shop

Copy code

(7) create a shop form under Shop Moduel;

  • Zf create form shop

Copy code

(8) layout:

  • Zf enable 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 !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.