1.U () URL assembly supports different URL patterns
U ($url = ", $vars =", $suffix =true, $domain =false)
@param string $url URL expression, format: ' [module/controller/operation # Anchor @ domain name]? parameter 1= value 1& parameter 2= value 2 ... '
@param string|array $vars parameters passed in, supporting arrays and strings
@param string $suffix pseudo-static suffix, which by default is true to get the configuration value
@param boolean $domain whether the domain name is displayed
@return string
2.D () D function for instantiating model class format [resource://][module/] Model
D ($name= ",$layer=")
@param string $name Resource Address
@param string $layer model layer Name
@return Model
The 3.M () M function is used to instantiate a model without a modeling file
M ($name= ",$tablePrefix=",$connection= ")
@param string $name model name supports specifying the underlying model such as Mongomodel:user
@param string $tablePrefix Table prefix
@param mixed $connection Database connection information
@return Model
4.I () Get input parameters support filtering and default values
I ($name,$default= ",$filter=null)
// Get ID parameter automatically determine get or post // get $_post[' name '] // Get $_get
5.B () Perform a behavior
B ($name,$tag= ',&$params=NULL)
@param string $name behavior name
@param string $tag tag name (the behavior class does not need to be passed in)
@param Mixed $params parameters passed in
@return void
6.C () Read and set configuration parameters
C ($name=null,$value=null,$default=null)
@param string|array $name Configuration variables
@param mixed $value configuration values
@param mixed $default Default value
@return Mixed
7.E () throw exception handling
E ($msg$code=0)
@param string $MSG Exception message
@param integer $code exception code defaults to 0
@return void
8.G () Recording and statistics time (microseconds) and memory usage
G ($start,$end= ",$dec=4)
// record start tag bit//... Interval Run code // record end tag bit echo// statistic interval run time accurate to decimal after 6 bit echo // statistical interval Memory usage
If the end tag bit is not defined, it is automatically marked as the current marker bit
Where statistical memory usage requires MEMORY_LIMIT_ON constant is true only valid
@param string $start start tag
@param string $end end tag
@param integer|string $dec decimal digits or M
@return Mixed
9.L () Get and set language definitions (case insensitive)
L ($name=null,$value=null)
@param string|array $name Language variables
@param mixed $value language values or variables
@return Mixed
10.T () Get template file Format resource://Module @ Theme/controller/operation
T ($template= ",$layer=")
@param string $name template resource Address
@param string $layer view layer (directory) name
@return string
11.N () Set up and get statistical data
N ($key,$step=0,$save=false)
1 // number of database operations logged 2 // record number of reads 3 Echo // get all operations for the current page database 4 Echo // Gets the current page read Count
@param string $key Identify the location
@param integer $step Stepping value
@return Mixed
12.A () A function for instantiating A controller
Format: [Resource://][module/] Controller
1 A ($name,$layer= ",$level=")
@param string $name Resource Address
@param string $layer Control layer Name
@param integer $level Controller hierarchy
@return Controller|false
13.R () How to remotely invoke a controller
URL parameter format [resource://][module/] Controller/operation
1 R ($url,$vars=array(),$layer= ")
@param string $url Call Address
@param string|array $vars Call parameters support strings and arrays
@param string $layer The name of the control layer to invoke
@return Mixed
14.W () Render Output widget
1 W ($name,$data=array())
@param string $name widget name
@param array $data parameters passed in
@return void
15.S () Cache management
1 S ($name,$value= ",$options=null)
@param mixed $name Cache name if the array represents cache settings
@param mixed $value Cache value
@param mixed $options Cache parameters
@return Mixed
16.F () Fast file data reading and saving for simple type data strings, arrays
F ($name$value= ",$path=data_path)
@param string $name Cache name
@param mixed $value Cache value
@param string $path Cache path
@return Mixed
thinkphp Common single-letter functions