0
为了调试,我输入了两个回声到的if-else-如果一个方法部分:if-else-if条件下的PHP错误?
if ($options instanceof Zend_Config) {
$options = $options->toArray();
echo "1st condition true<br>";
} else if (! is_array($options)) {
echo "2nd condition true<br>";
exit();
throw new Bvb_Grid_Exception('options must be an instance from Zend_Config or an array');
}
疯狂的事情是我得到的输出:
1st condition true
2nd condition true
灿你解释这个?!?!
@ user522350:要验证netcoder说的是什么(“您正在调用该例程两次”),插入名为
“;”的`echo“。如果它没有帮助:你确定这是你的代码吗? – thejh 2010-11-27 15:49:26
添加`echo'运行我的代码'';`在第一个if之前,检查它通过那里的次数。 – 2010-11-27 15:52:22