Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 twig 中分配了一个新的全局变量:
$twig->addGlobal("lang", Config::$lang);
我想在 if 语句中检查这个变量,但它不起作用
{% if lang == 'en' %}
如何检查if语句中的全局变量?