![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
我跑的系統AppServ 2.4.4a php4.3.11
<?php
$GLOBALS["countbytes"]=true;
if (!isset($countbytes))
$GLOBALS["countbytes"] = t2;
echo $GLOBALS["countbytes"];
?>
run to IE:1
---------------------------------
<?php
$GLOBALS["countbytes"]=NULL;
if (!isset($countbytes))
$GLOBALS["countbytes"] = t2;
echo $GLOBALS["countbytes"];
?>
run to IE:t2
----------------------------------
<?php
$GLOBALS["countbytes"]=3;
if (!isset($countbytes))
$GLOBALS["countbytes"] = t2;
echo $GLOBALS["countbytes"];
?>
run to IE:3
-----------------------------------
問題來了,為何跑 false 會什麼都沒有
<?php
$GLOBALS["countbytes"]=false;
if (!isset($countbytes))
$GLOBALS["countbytes"] = t2;
echo $GLOBALS["countbytes"];
?>
run to IE:什麼都沒有
-------------------------------------
後我又把isset前面的 ! 去掉,又正常
<?php
$GLOBALS["countbytes"]=false;
if (isset($countbytes))
$GLOBALS["countbytes"] = t2;
echo $GLOBALS["countbytes"];
?>
run to IE:t2
何解,為何用false跑IE會什麼都沒有.....是isset的bug嗎
please

