2016-11-30-Initial knowledge of thinkphp

Source: Internet
Author: User

For the first time, thinkphp3.2.3 was selected first (after all, 5 is just out, and there are not many documents).

    1. Learning from MVC views

MVC refers to the model View Controller

Model View Controller, respectively

The view is probably the meaning of the template, the controller is used to process the data, assign values to the template

URL address specification for 2.Thinkphp

url/Site name/model/operation/Parameter name 1/parameter value/....

3.Thinkphp Read configuration file

C (' parameter name ');

4.Thinkphp $this Object Use

4.1 Rendering templates

$this->display ();

4.2 Error Hints

$this->error ();

4.3 Tips for success

$this->success ();

4.4 Template Assignment

$this->assign (' variable name ', ' value ');

5.CURD Operation:

Curd refers to the Create update read delete

(This is a core function for the moment without further study.)

6. Initial learning of Ajax

Ajax relies on JS, so the origin of everything is still the object

Create a XMLHttpRequest object

Variable=new XMLHttpRequest ();

Then you can do it.

7.js Event System

JS event depends on HTML attribute

So you need to mount the event to write the event to the HTML tag.

This article is from the "Flowers" blog, please be sure to keep this source http://hekaihao.blog.51cto.com/11759638/1878296

2016-11-30-Initial knowledge of thinkphp

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.