【问题标题】:What does "{% %}" syntax mean?“{% %}”语法是什么意思?
【发布时间】:2012-04-21 19:19:25
【问题描述】:

我正在使用某人的 PHP 文件。 它的文字如下:

<html>
... regular HTML
{% if (some condition){       
    <another regular html tag>
    </another regular html tag>
}%}
</html>

如果这些 {% tags %} 是 javascript 或 PHP,或者其他什么,我不明白吗? 谢谢。

【问题讨论】:

    标签: php javascript html


    【解决方案1】:

    这是一些模板语言。很可能是服务器端的,即基于 PHP 的。

    【讨论】:

      【解决方案2】:

      在我看来就像一个模板。 {%%} 是模板的系统,用于识别它必须在哪里工作。

      【讨论】:

        【解决方案3】:

        可以想到两个原因:

        1. 用户可能已更改"&lt;?" to "&lt;%"

        2. 它是一种模板语言

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2013-11-02
          • 2018-05-12
          • 2014-04-21
          • 2021-03-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2012-05-17
          相关资源
          最近更新 更多