1, in the relevant test, you must turn on the debug mode:define (' App_debug ', true); Add in Unique Portal file index.php
2. What is the function of opening debug mode? (closed by default, around thinkphp.php 33 rows)
(1) When the illegal call, there is a detailed error message, easy to debug
(2) App_debug is true and the cache file exists, go to cache file, otherwise load common folder under runtime.php (code below think.php)
(3) Do not produce cache files at the same time App_debug to True will delete Runtime_file (cache) files (runtime.php 126 rows or so).
thinkphp.php file (bottom)
if (! App_debug && Is_file (runtime_file)) {
Deployment mode loads directly into run cache
Echo __file__; G:\wamp\www\orange\ThinkPHP\ThinkPHP.php
Require runtime_file;
}else{
system catalog Definition
Think_path G:\wamp\www\orange\ThinkPHP
Defined (' Think_path ') or define (' Think_path ', DirName (__file__). ' /‘);
When you load a runtime file
Require Think_path. ' Common/runtime.php ';
}
2. URL mode
(1) 0-> Normal mode
(2) 1-> default mode pathinfo mode
(3) 2-> rewrite mode
(4) 3-> compatibility mode
To output the current URL pattern: Echo C (' Url_model ');
To get the current page address: Using the U method
Form:U (' Controller name/method ', array (' ID ' =>x), ' suffix ', ' whether jump ' (true or false), ' localhost ');
For example: U (' Index/index ', array (' ID ' =>1), ' HTML ', ' true ', ' localhost ');
Thinkphp 3.2.3 Release Study notes