thinkphp Framework basic knowledge, introduced to the new

Source: Internet
Author: User

thinkphp frame abbreviation TP frame:

index.php: Entry file for the project, all pages are accessed from this page
Application: folder where items are stored
Public: Things to store
THINKPHP:TP frame of the core folder, inside the things try not to modify
It contains: 1.common: Core function library, user-defined function can exist inside this
2.conf: Config file, mainly inside the convention.php
3.lang: Language Pack
4.library: Store TP Core class file, inside the Think storage class, we use the class basically are in
5.mode: Model Folder
6.TPL: Template Folder
You can define your own project storage files:
Runtime: for storing cache files
There's 1.catch in it: the cached file.
2.data: Database Cache

Home folder: The module in the project, the development of all the code written in the home (* important)
Inside: 1.common: Store function, write your own can be put in
2.conf: Config file config.php is the configuration file
If you want to modify the configuration do not modify the thinkphp, modify the home conf config.php
*3.controller: Controller
*4.model: Model
*5.view: View
These three are called MVC patterns.
M: Model (data) Layer: Operational data (data connection, data access and other operational databases)
V: View layer: Provide display template
*C: Controller called logical layer: Implementing Business logic

**MVC: Conventions are better than configuration


Action: The method that is placed inside the controller

Previous access by: Access page
* Access using MVC: Access the operation under the Controller (method), not a specific page

Four-way access:
1. Locate the entry file index.php
HTTP://localhost/index.php?m=Home (module) &c=index (Controller name) &a=index (method name) Basic Get mode
2.http://localhost/index.php/home/index/index path mode is: localhost/index.php/module/Controller name/method name
3.http://localhost/home/index/index rewrite rewrite mode: Omit the entry file
4.

If you want to modify the configuration can not be directly in the Conf in the Convention modification, the Convention need to modify the items in their own files in the Conf config to modify

thinkphp Framework basic knowledge, introduced to the new

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.