To establish a Zend Framework project using the command line

Source: Internet
Author: User
Tags zend zend framework

The project structure of the Zend framework is rather complex, but it has a well-established structure. The Zend framework provides the tools to build the project structure using the command line, which is easy to use and can be used by beginners without orz for complex structures.

Configure the files involved with the ZF command line: The Library folder for the Zend framework Zend the Bin folder with the framework download Php.exe under the PHP root directory

First step:
Copy the Library and Bin folder to the server root directory, my server and directory for E:\wamp\www

Step Two:
Set the environment variable to modify the path value in the system variable. Concrete method, open cmd, run "path= path", the path can be judged according to the following two. Add the directory where the Bin folder path and Php.exe are located, and I add the E:\wamp\bin\php\php5.2.6; E:\wamp\www\bin (two path semicolon interval).
The environment variable is modified to allow the ZF command to be used in any file directory when using CMD. The ZF command can only be used in the bin directory if there are no environment variables, and the Php.exe directory cannot be executed if it is not in the environment variable.

Step three (not required)
If you are following the 12th step, then this step can be omitted. If your bin directory and lirary directory are not listed above, then you need to modify the zf.php file in 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 you export your ZF edition. So congratulations, you've set it up successfully.

Possible error: If output "' ZF ' is not internal or external command ...", check that your environment variable is set correctly. If the output ZF ERROR ..., then check if the Lirary directory in your bin/zf.php file is correct.

If everything works, you can use the command line to create the Zend Framework project. Enter the directory where you want to create the project, typically the server root directory. Input

ZF Create Project Yourprojectname

Then a brand new Zend Framework project, named Yourprojectname, is generated in the root directory.


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.