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