thinkphp is output

You can use literallabels to prevent label template is parsed, for example:

Marble members

  1. <literal>
  2. <if condition="$name eq 1 "> value1
  3. <elseif condition="$name eq 2"/>value2
  4. <else /> value3
  5. </if>
  6. </literal>

Above if the label contains the label is literal, so if the label inside the content will not be parsed template engine, but intact output.

If you need to output php tags similar situation {$ user} or XML tags, confuse the issue can be resolved by adding a literal tag, for example:

  1. <php>echo '{$Think.config.CUSTOM.'.$key.'}';</php>

The php tags {$ Think might be mistaken as a template engine parses the label, the solution is to add literal, for example:

  1. <php><literal>echo '{$Think.config.CUSTOM.'.$key.'}';</literal></php>

Literal tags can also be used for the outer layer of the page JS code to ensure that the use of some JS code and template engine does not create confusion.

In short, all the possible rules and resolve conflict where the built-in template engine can use literal label deal.

Guess you like

Origin www.cnblogs.com/furuihua/p/11834459.html