sme*_*pie 0 php if-statement operators smarty conditional-statements
嗯...你能告诉我为什么这样有效:
{if !$conta|contains:"word1" && ($product->id_category_default < 388 || $product->id_category_default > 475)}
Run Code Online (Sandbox Code Playgroud)
而这不是:
{if (!$conta|contains:"word1" || !$conta|contains:"word2") && ($product->id_category_default < 388 || $product->id_category_default > 475)}
Run Code Online (Sandbox Code Playgroud)
语法错误在哪里?
试试这个:
{if !($conta|contains:"word1" || $conta|contains:"word2") && ($product->id_category_default < 388 || $product->id_category_default > 475)}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
17465 次 |
最近记录: |