Zend framework basic tutorial 2 (Zend parsing)

Source: Internet
Author: User
Tags zend framework
PHP Technology Exchange Group 170855791

We have used ZF to create helloword.ProgramFile structure, which is a standard MVC structure. In this section, we will discuss the functions of each folder.

There are always four top-level directories in the project root directory: 1. application2.libray3. test4.web _ Root

Application folder The application folder contains all Code . You cannot directly access this folder on the web. The display layer, business layer, and control logic layer are all separated. The application folder also contains the models, views, and controllers folders. These folders contain model, view, and control files respectively. You can also create other folders, such as configuring the folder configs. Library folder All programs will use the Zend class library. We store Zend framework here. But in fact, you can store the class library folder in any location, as long as the program can find them. You can put these class inventory in the public reference folder accessible by the PHP program on the server, such as:/usr/php_include or c: \ code \ php_include. But make sure to change the php. ini configuration file (or you can use the set_include_path () method) Test folder This folder is used to store all the test units you have written. If you do not know what a test unit is, you can check it out. Many PHP programmers do not regard storing test units as a special step. What about you? Web_root folder All Web requests are directed by a single file, usually called index. php. This is the only PHP file that needs to be accessed through the web server. This file is stored in the web_root folder. Other publicly accessible files include images, CSS, and JavaScript. These files are stored in their own subdirectories in the web_root folder. Next, we will start to write a simple helloword program.

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.