Thinkphp letter function description T/I/N/D/M/A/R/U, thinkphp Function Description

Source: Internet
Author: User
Tags vars

Thinkphp letter function description T/I/N/D/M/A/R/U, thinkphp Function Description

1,

/*** Get template File Format resources: // module @ topic/controller/operation * @ param string $ template resource address * @ param string $ layer view layer (directory) name * @ return string */T ($ template = '', $ layer = '')

2,

/*** Input parameters can be filtered and default values * usage: * <code> * I ('id', 0 ); get the id parameter to automatically determine get or post * I ('Post. name ', '', 'htmlspecialchars'); get $ _ POST ['name'] * I ('get. '); obtain the $ _ GET * </code> * @ param string $ name variable name. The variable name supports the specified type * @ param mixed $ default. The default value is * @ param mixed $ filter. * @ param mixed $ additional data source to be obtained by datas * @ return mixed */I ($ name, $ default = '', $ filter = null, $ datas = null)

3,

/*** Set and obtain statistical data * usage: * <code> * N ('db', 1); // record the number of database operations * N ('read ', 1); // record read count * echo N ('db'); // obtain all operations of the database on the current page * echo N ('read '); // obtain the number of reads on the current page * </code> * @ param string $ key ID position * @ param integer $ step value * @ param boolean $ save whether to save the result * @ return mixed */N ($ key, $ step = 0, $ save = false)

4,

/*** Instantiate the model class format [Resource: //] [module/] Model * @ param string $ name resource address * @ param string $ layer Model layer name * @ return Think \ Model */D ($ name ='', $ layer = '')

5,

/*** Instantiate a Model without a Model file * @ param string $ name Model name. You can specify a basic Model, such as a Model: user * @ param string $ tablePrefix table prefix * @ param mixed $ connection database connection information * @ return Think \ Model */M ($ name = '', $ tablePrefix = '', $ connection = '')

6,

/*** Instantiate a multi-layer controller. Format: [Resource: //] [module/] Controller * @ param string $ name resource address * @ param string $ layer control layer name * @ param integer $ level Controller level * @ return Think \ Controller | false */A ($ name, $ layer = '', $ level = 0) 7./*** the URL parameter format of the Remote Call controller [Resource: //] [module/] Controller/operation * @ param string $ url call address * @ param string | array $ vars call parameters support strings and arrays * @ param string $ layer to call the name of the control layer * @ return mixed */R ($ url, $ vars = array (), $ layer = '')

8,

/*** URL Assembly supports different URL modes * @ param string $ url expressions. Format: '[module/controller/Operation # anchor @ domain name]? Parameter 1 = value 1 & Parameter 2 = value 2... '* @ param string | array $ vars input parameters. arrays and strings * @ param string are supported. | boolean $ suffix pseudo-static suffix, the default value is true. * @ param boolean $ domain indicates whether the domain name is displayed * @ return string */U ($ url = '', $ vars = '', $ suffix = true, $ domain = false)

The above description of the thinkphp letter function T/I/N/D/M/A/R/U is all the content that I have shared with you. I hope to give you A reference, we also hope that you can support the customer's home.

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.