Thinkphp Template Call Function method

Source: Internet
Author: User
Tags timestamp to date

thinkphp Template Call function method {variable| function 1| function 2| function 3 =parameter 1, parameter 2, Parameter 3,###} # # #为第4个参数, replace the variable with the 4th parameter example: {$username|substr=0,3} take the first 3 characters in the header {$times|date='y-m-d h:i:s', # # #} converts times timestamp to date format==================================================use of the colon execution function: Output method and Execute return value {: U ('User/insert'} Example: {: Time ()} outputs the current date format and will be parsed into<?php echo Time ();?> ==================================================usage of wavy line function: Execute method without output {~function ()} example: {~SUBSTR ("aaaaaaa",3} does not output after execution, the back is parsed into <?php substr?> ============================================{$Think.Get. The get-over parameter in the URL} {$Think a variable in Server.server} {$Think the ID in session.session.|MD5} If you want, you can also MD5 the value {$Think. ID in Cookie.cookie}============={$Think. config.db_host} read configuration information in config {($title)? ($title):'No value currently'if the current parameter does not have a value, the following description is displayed================== <SwitchName=""> < CaseValue="1">aaaaaa</ Case> < CaseValue="2">bbbbbbbbb</ Case> <default/>No Data</Switch> =============== <eq name="a"Value="3">a equals 3<.Else/>a is not equal to 3</eq> <eq name="A|strlen"Value="1"The length of the >a is equal to 1<Else/>a length Not equal to 1</eq> ================= <inchName="a"Value="1,2,3,4"> variable a value at 1,2,3, print </in 4 rangeinch> <notin name="a"Value="1,2,3,4"> variable A value is not 1,2,3, print </notin> in 4 rangeor with<range name="a"Value="1,2,3,4"Type="inch">a in 1,2,3, 4 in range </range>//type to Notin is not, this method can replace in and Notin=============== <empty name="a">a variable is empty </empty> <notempty name="a">a variable is not empty </notempty>

Thinkphp Template Call Function method

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.