Home  >  Article  >  Backend Development  >  What order should I use PHP frameworks? How to use PHP framework for beginners

What order should I use PHP frameworks? How to use PHP framework for beginners

PHPz
PHPzforward
2016-07-29 08:36:543554browse

What this article brings to you is about the order in which PHP framework is used? How novices use the PHP framework has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. In the construction method __construct:

generally write the data related to the paging function (the reception of the page and the number of items displayed on each page pageSize), the verification of whether to log in;

Some public parameters of the rendering page (like: 1. The search fields of gender and age are spliced ​​into $_GET or $_POST 2. The width of the page navigation bar)

2. The main method corresponds to the page. The rendered content is roughly the same and is written in the public method. The parameters are passed to distinguish

like:   
public function planning($params){
 $this->common($params,$id);
}
public function analysis($params){
 $this->common($params,$id);
}
public function common($params,$iColumnId=""){
1,页面的渲染
2,分页
3,URL的拼接
}

The following are each Method: Encapsulation of method.............

3. The addition, deletion, modification and query in the background must comply with the status of

and the effect of
----------- --------------------------
Add add page
------------------ ------------------
Add OK button doadd action
-------------------------- ------------
Modify update page
---------------------------------- ----
Edit edit Action
----------------------------------------
Delete delete action
----------------------------------------
View the page

The above is the order of using the PHP framework ? A complete introduction to how to use the PHP framework for novices. If you want to know more about php programming from entry to proficiency, a full set of video tutorials, please pay attention to the PHP Chinese website.

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete

Related articles

See more