: This article mainly introduces the full solution of the THinKPHP function library. if you are interested in the PHP Tutorial, please refer to it. In ThinkPHP 3.2.3, 46 of the following function systems have been encapsulated. The following are summarized for two purposes:
1. understand the ThinkPHP framework methods.
2. developers do not need to encapsulate their own methods.
Go to the topic:
1 letter function: a total of 16
A cross-origin call (commonly used)
B Behavior: execution Behavior
C config load the configuration file (frequently used)
D: Model instantiation (common)
E exception handling
F file processing
G records and statistics time (microseconds) and memory usage
I form processing (commonly used)
L language: language Pack
M Model database table operations (commonly used)
N. set and obtain statistical data
R cross-origin call
S cache
T template
U url processing (commonly used)
W Widget rendering output
2 single word functions (12)
Controller
Cookie processing
Compile the compile Template
Dump input
Import Warehouse receiving (frequently used)
Layout: Set the layout of the current page
Load
Redirect redirection (commonly used)
Session processing (commonly used)
Tag
Trace with track
Vendor import to third-party library (commonly used)
3 Multiple function inputs (17)
File loading
Load_config supports format conversion when loading the configuration file. only the first-level configuration is supported.
Load_ext_file load dynamic extension files (important)
PHP optimization
Require_cache optimized require_once
In_array_case case-insensitive in_array implementation
File_exists_case case-sensitive file existence judgment
To_guid_string generate unique ID numbers based on various PHP variables
Network
Is_ssl determines whether the SSL protocol is used (important)
Send_http_status send HTTP status (important)
Get_client_ip get the client IP address (important)
XML
Xml_encode XML encoding
Data_to_xml data XML encoding
String Processing
Think_filter SQL security filter
Strip_whitespace removes spaces and comments from the code (important)
Parse_name string naming style conversion
Others
Parse_res_name parse the resource address and import the class library file
Array_map_recursive recursive call
Throw_exception custom exception handling (not recommended, replaced by e)
Yaml_parse_file parses the yaml file and returns an array.
Reference
Http://www.cnblogs.com/asplamapie/p/4108400.html
The above describes the full solution of the THinKPHP function library, including some content. I hope my friends who are interested in the PHP Tutorial can help me.