thinkphp_template operation

WBOY
Release: 2016-07-25 09:12:01
Original
861 people have browsed it

Quick output variables

  1. {:function(...)} //Execute the method and output the return value
  2. {~function} //Execute the method without output
  3. {@var} //Output the Session variable
  4. {#var} //Output the Cookie variable
  5. {&var} //Output configuration parameters
  6. {%var} //Output language variables
  7. {.var} //Output GET variables
  8. {^var} //Output POST variables
  9. {*var} //Output constants
Copy code

Template output

  1. //1 Directly call the index operation template
  2. $this->display();
  3. // Corresponds to Myapp/Tpl/default/Index/index.html
  4. //2 Call the test1 operation template of the Index module
  5. $ this->display('test1');
  6. //corresponds to Myapp/Tpl/default/Index/test1.html
  7. //2 Call the test2 operation template of the Message module ()
  8. $this->display('Message: test2');
  9. //Corresponds to Myapp/Tpl/default/Message/test2.html
  10. //3 Calls the test2 operation template of the Message module of the XP theme
  11. $this->display('Xp@Message:test2');
  12. //corresponds to Myapp/Tpl/Xp/Message/test2.html
  13. //4 Directly specify the full name of the template file
  14. $this->display('../Message/test3.html');
  15. //corresponds Myapp/Tpl/default/Message/test3.html
Copy code



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!