Detailed tutorial on importing resource files into ThinkPHP template engine

WBOY
Release: 2016-07-25 08:53:08
Original
869 people have browsed it
  1. endif;
  2. ?>
Copy code

2.load tag The second is the load tag, which imports the public JS or CSS of the current project through the URL, for example:

  1. < load href="/Public/Css/common.css" />
Copy code

You can use special template tags to replace the href attribute, for example:

Copy code

Load tag does not need to specify the type attribute, the system will automatically determine based on the suffix. Of course, the load tag also supports conditional judgment calls:

Copy code

The system also provides two tag aliases js and css. The usage is consistent with load, for example:

Copy code

The load tag also supports importing multiple resource files at the same time, even different types of resource files:

Copy code


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