thinkphp Single Letter Function Summary

Source: Internet
Author: User
Tags exception handling memory usage vars
U () URL assembly supports different URL patterns
U ($url = ', $vars = ', $suffix =true, $domain =false)

@param string $url URL expression, format: ' [module/Controller/Action # anchor @ domain name]? parameter 1= value 1& parameter 2 = value 2 ... '

@param string|array $vars passed parameters, supports array and string

@param string $suffix pseudo static suffix, and defaults to True to get configuration values

@param Boolean $domain whether to display the domain name

@return string
The d () d function is used to instantiate the model class format [resource://][module/] Model
D ($name = ', $layer = ')

@param string $name resource address

@param string $layer model layer name @return models

the M () m function is used to instantiate a model without a modeling file
M ($name = ', $tablePrefix = ', $connection = ')

@param string $name model name supports the specified underlying model such as Mongomodel:user

@param String $tablePrefix table prefix

@param mixed $connection database connection information

@return Model
I () get input parameter support filter and default value
I ($name, $default = ', $filter =null)

use method:

I (' id ', 0);//get ID parameter to automatically judge getting or post

I (' post.name ', ', ', ', ') Htmlspecialchars '); Gets $_post[' name '

I (' Get. ');//Obtain $_get
B () perform an action
B ($name, $tag = ',& $params =null)

@param string $name behavior name

@param string $tag label name (the behavior class does not need to be passed in)

@param Mixed $params passed in parameters

@return void
C () Read and set configuration parameters
C ($name =null, $value =null, $default =null)

@param string|array configuration variables $name

mixed @param configuration values $value

Mixed $default default value

@return mixed
E () throwing exception handling
E ($msg, $code =0)

@param string $msg exception message

@param integer $code exception code defaults to 0

@return void
G () Logging and statistical time (microseconds) and memory usage
G ($start, $end = ', $dec =4)

use method:
g (' begin ');//record start tag bit

///... The interval runs code

g (' end ');/////////////////////////////////////////////////

Statistical interval Memory usage

If the end marker bit is not defined, it is automatically available with the current tag bit

where the MEMORY_LIMIT_ON constant is required to be true

@param string $start start tag

@param string $end end tag

@param integer|string $dec decimal places or M

@return mixed
L () gets and sets the language definition (case-insensitive)
L ($name =null, $value =null)

@param string|array $name language variables @param

mixed $value language values or variables

@return mixed
T () Get template file Format resource://Module @ Theme/controller/action
T ($template = ', $layer = ')

@param string $name template resource address

@param string $layer view layer (directory) name

@return string
N () set up and get statistical data
N ($key, $step =0, $save =false)

use method:
N (' db ', 1);//Log database operation times

N (' read ', 1);//Record read Count

echo N (' db '); Gets all operands of the current page database

echo N (' read ');//Get the current page read Count

@param string $key identity position

@param integer $step step value

@return Mixed
A () a function to instantiate the controller
Format: [Resource://][module/] Controller

A ($name, $layer = ', $level = ')

@param string $name resource address

@param string $layer control layer Name

@param integer $level controller level

@return Controller|false
R () How to remotely invoke the controller
URL parameter format [resource://][module/] Controller/Operation

R ($url, $vars =array (), $layer = ")

@param string $url call address

@param string| Array $vars call parameters support string and array

@param string $layer The name of the control layer to invoke

@return mixed
W () render output widget
W ($name, $data =array ())

@param string $name widget name

@param array $data parameters passed in

@return void
S () cache management
S ($name, $value = ', $options =null)

@param mixed $name cache name, if the array represents caching settings

@param mixed $value cache value @param

Mixed $options cache parameters

@return Mixed
F () Fast file data read and save for simple type data strings, arrays

"'
F (name, name, value= ", $path =data_path)

@param string $name Cache name

@param mixed $value Cache value

@param string $path Cache path

@return Mixed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.