Thinkphp _ template operation

Source: Internet
Author: User
Thinkphp _ template operation

Quick output variable

  1. {: Function (...)} // Execute the method and output the returned value
  2. {~ Function} // the execution method is not output
  3. {@ Var} // output the Session variable
  4. {# Var} // output Cookie variable
  5. {& Var} // output configuration parameters
  6. {% Var} // output language variable
  7. {. Var} // output GET variable
  8. {^ Var} // output the POST variable
  9. {* Var} // output constant

Template output

  1. // 1 directly call the index operation Template
  2. $ This-> display ();
  3. // Corresponding to Myapp/Tpl/default/Index/index.html
  4. // 2 call the test1 operation template of the Index module
  5. $ This-> display ('test1 ');
  6. // Corresponding to Myapp/Tpl/default/Index/test1.html
  7. // 2 call the test2 operation template of the Message module ()
  8. $ This-> display ('Message: test2 ');
  9. // Corresponding to Myapp/Tpl/default/Message/test2.html
  10. // 3 call the test2 operation template of the Message module of the XP topic
  11. $ This-> display ('XP @ Message: test2 ');
  12. // Corresponding to Myapp/Tpl/Xp/Message/test2.html
  13. // 4 specify the full name of the template file.
  14. $ This-> display ('../Message/test3.html ');
  15. // Corresponding to Myapp/Tpl/default/Message/test3.html

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.