Thinkphp _ template operation_php tutorial

Source: Internet
Author: User
Thinkphp _ template operation. Quick output variable {: function ()} execution method and output return value {~ Function} does not output {@ var} output Session variable {# var} output Cookie variable {var} saved output variable

{: Function (...)} // Execute the method and output the returned value {~ Function} // the execution method does not output {@ var} // The output Session variable {# var} // The output Cookie variable {& var} // The output configuration parameter {% var }/ /output language variable {. var} // output GET variable {^ var} // output POST variable {* var} // output constant

Template output

// 1 directly call the index operation template $ this-> display (); // corresponding to Myapp/Tpl/default/Index/index.html // 2 call the test1 operation template of the Index module $ this-> display ('test1 '); // corresponding to Myapp/Tpl/default/Index/test1.html // 2 call the test2 operation template of the Message module () $ this-> display ('Message: test2 '); // corresponding to Myapp/Tpl/default/Message/test2.html // 3 call the test2 operation template of the Message module of the XP topic $ this-> display ('XP @ Message: test2 '); // specify the full name of the template file $ this-> display ('.. /Message/test3.html '); // corresponding to Myapp/Tpl/default/Message/test3.html

Else {: function ()} // executes the method and outputs the returned value {~ Function} // the execution method does not output {@ var} // The output Session variable {# var} // The output Cookie variable {var }//...

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.