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