Thinkphp v2.2 does not describe thinkphp v2.2 !!!
The following is a summary of the content not mentioned and described in this document: (updated continuously in the future)
1. Set app_debug to true in the configuration file. When the debug mode is enabled, the trace information is not displayed on the page by default.
Solution: 'Show _ page_trace '=> true
Add this.
2. The success method in the action only needs to store two parameters success ($ message, $ Ajax = false). The called page is displayed even if it is not written.
Solution: Add 'tmpl _ action_success 'to the configuration file'
=> 'Public: Success '(error jump: 'tmpl _ action_error' => 'public: Success ')
In fact, in version 2.2, the default setting is 'tmpl _ action_error '=> think_path.'/TPL/dispatch_jump.html '.
3. Use the normal label load template engine to directly ignore it.
Solution: none (no reason is found)
4. _ root _ the input in the template will only be empty characters. After the page jumps, the _ root _ address cannot be used to return to the homepage.
Solution: Modify _ root __by yourself, or add <Base
Href = 'HTTP: // root directory address for Website access '/>, for example: <base href = 'HTTP: // winesbox.com'/>
5. The thinkphp framework on some servers may encounter the following problems:
The module cannot be loaded. In this case, whether the. htaccess file is set is irrelevant.
The problem lies in the getpathinfo method in thinkphp \ Lib \ think \ util \ dispatcher. Class. php.
This method returns a negative value to $ _ server ['path _ info'], and the problem arises.
$ _ Server ['path _ info']
$ _ Server ['orig _ path_info ']
$ _ Server ['redirect _ path_info ']
$ _ Server ["redirect_url"]
The above system variables may not exist. This is a pain point, so getpathinfo will always determine which one is going to do something.
The cause of the error is that the operation is performed after $ _ server ["redirect_url"]. The original code is as follows:
$ Path
= $ _ Server ["redirect_uri"];
If (empty ($ _ server ['query _ string']) | $ _ server ['query _ string'] == _ server ["redirect_query_string"]) {
$ Parsedurl = parse_url ($ _ server ["request_url"]);
If (! Empty ($ parsedurl ['query']) {
$ _ Server ['query _ string'] = $ parsedurl ['query'];
Parse_str ($ parsedurl ['query'], $ get );
$ _ Get = array_merge ($ _ Get, $ get );
Reset ($ _ Get );
} Else {
Unset ($ _ server ['query _ string']);
}
Reset ($ _ server );
}
The reason for the error is marked in red. changing it to request_uri will be normal.
* Note: $ _ server ["request_uri"] gets the value after the http://blog.lpreterite.com, including/