PHP警告:除零错误(temp tpl)

时间:2014-10-23 08:17:26

标签: php

我收到以下错误:

Warning: Division by zero in /home/vaibongd/public_html/temporary/%%B0^B0F^B0FD4939%%right2.tpl.php on line 19

第19行是代码中的第一行。我查看了一些相关的问题,我的所有引号似乎都在正确的位置。

<?php if ($this->_tpl_vars['page'] == "" / vai / ""): ?>
            <div class="custom-block-content">
                <ul class="new_cungloai">
                    <?php unset($this->_sections['f']);

我做错了什么?

2 个答案:

答案 0 :(得分:2)

您的if条件不起作用,因为/ vai /未被转义 试试这个:

if ($this->_tpl_vars['page'] == '" / vai / "'):

或者如果你只是想/ vai /使用它:

if ($this->_tpl_vars['page'] == ' / vai / '):

答案 1 :(得分:1)

if ($this->_tpl_vars['page'] == "\" / vai / \""): // Just add slashes to ignore the quotes conflict