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.