【问题标题】:Is it possible to access directly a define with rain tpl是否可以使用rain tpl 直接访问定义
【发布时间】:2013-09-09 10:26:32
【问题描述】:

我需要访问由rain tpl管理的模板中的DEFINE(在php中定义)。

define ('USECACHE',false);

我想知道是否有一种方法可以直接使用 rain tpl 访问我的定义而不将其分配给模板(就像使用全局变量 POST、GET、SESSION、... 一样)

{$GLOBALS.variable}

【问题讨论】:

    标签: php templates constants


    【解决方案1】:

    您可以通过以下语法访问constants

    {#USECACHE#}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-09
      • 2012-04-03
      • 2017-10-30
      • 2011-07-10
      相关资源
      最近更新 更多