Thinkphp framework learning

Source: Internet
Author: User
Tags php development environment
No matter which PHP development environment is used, you must configure the development environment well. Generally, enter http: // localhost in the browser and press Enter. or add your port number to the end. the default value is 80. you can change it to 8080 or 8081. I am on a local machine.

Thinkphp has two environments: wampServer and appServ. their directories are under the wamp Directory of the installation directory and the www directory under the app directory respectively.

No matter which PHP development environment is used, you must configure the development environment well. Generally, enter http: // localhost in the browser and press Enter. or add your port number to the end. the default value is 80. you can change it to 8080 or 8081, I have installed two environments on the local machine: http: // lcoalhost and http: // localhost: 8081 mysql database, and two programs, discus and ecshop, respectively.

The outline is as follows:

1. what is MVC (understanding)

M-Model write model class to operate data

V-View: compile html files and display pages

C-Controller: write a class file (UserAction. class. php)

II. MVC features of ThinkPHP (understanding)

III. Directory corresponding to ThinkPHP MVC (learn more)

M project directory/application directory/Lib/Model

V project directory/application directory/Tpl

C project directory/application directory/Lib/Action

4. url access C (learn more)

5. four url access methods (important)

1. PATHINFO mode -- focus !!!!!!

Http: // domain name/project name/entry file/module name/method name/key 1/value 1/Key 2/value 2

2. normal mode

Http: // domain name/project name/entry file? M = module name & a = method name & key 1 = value 1 & Key 2 = value 2

3. REWRITE mode

Http: // domain name/project name/module name/method name/key 1/value 1/Key 2/value 2

4. compatibility mode

Http: // domain name/project name/entry file? S = module name/method name/key 1/value 1/Key 2/value 2

Related Article

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.