有问题的代码:
<?php /*tests added by jason*/
echo "<br />";
echo "count = " . $this->countModules('showcase');
echo "<br />";
echo "hidebyview = " . $hideByView;
echo "<br />";
if($hidebyview == true) {
echo "T";
}
else {
echo "F";
}
echo "<br />";
if ($this->countModules('showcase') && $hideByView == false) {
echo "pass";
}
else {
echo "fail";
}
echo "<br />";
?>
站点1输出Apache / 2.2.22(Ubuntu)PHP版本5.3.10-1ubuntu3.7(一切正常):
count = 1
hidebyview =
F
pass
站点2输出Apache / 2.2.13(Win32)PHP / 5.3.26(事情坏了):
count = 1
hidebyview = 1
F
fail
我想这可以归结为评估的部分如何能够失败&#34;评估不同的答案?
答案 0 :(得分:0)
$hideByView == false
并非(始终)等于!($hidebyview == true)
。因此,您的调试信息并未真正显示您的表达式$hideByView == false
的评估结果。