Use the command line to create a Zend framework project

Source: Internet
Author: User

The project structure of Zend framework is complex, but it has an established structure. Zend framework provides a tool to generate a project structure using command lines, which is very convenient for beginners without orz for complex structures.

Files involved in the configuration of ZF command line:

    • Library folder of Zend framework
    • Bin folder when Zend framework is downloaded
    • Php.exe under the phproot directory

Step 1:
Copy the library and bin folders to the root directory of the server. The root directory of my server is E: \ Wamp \ www.

Step 2:
Set the environment variable and modify the path value in the system variable. For details, open CMD and run "Path = path". The path can be determined based on the following two steps. In the directory where the binfile folder and php.exe are located on the terminal, I added E: \ Wamp \ bin \ PHP \ php5.2.6; E: \ Wamp \ www \ bin (two path semicolon intervals ).
To modify environment variables, run the ZF command in any file directory when CMD is used. If there is no environment variable, you can only use the zfcommand in the bindirectory, And the php.exe directory cannot be executed if it is not in the environment variable.

Step 3 (not required)
If you follow Step 1 and step 2, skip this step. If your bin directory and lirary directory are not placed as above, you need to modify the ZF. php file under the bin directory.

$ Zfincludepath ['relativepath'] = dirname (_ file _). '/../library /';

Modify the relative path so that the ZF command can find the lirary folder. Open CMD and enter ZF show version if your ZF version is output. Congratulations! You set it successfully.

Possible errors:

    • If the output "'zf 'is not an internal or external command ....", Check whether your environment variables are set correctly.
    • If ZF error... is output ....., Check whether the lirary directory in your bin/ZF. php file is correct.

If everything works, you can use the command line to create a Zend framework project. Go to the directory where you want to create a project, usually the root directory of the server. Input

ZF Create Project yourprojectname

Then a new Zend framework project named yourprojectname will be generated under the root directory.

 

Reprinted from: http://www.ruiwant.com/%E4%BD%BF%E7%94%A8%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%BB%BA%E7% AB %8Bzend-framework%E9%A1%B9%E7%9B% AE .html

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.