$status 返回 0,但循环就像它的“1”一样。有趣的是我的错误消息是“MySQL DB 正在使用中(状态 0)”。
换句话说:即使它是真的,我的 if 语句也会失败。
错在哪里?
include 'status_check.php'; //it takes $check from MySQL DB
if($status = "0") { //if status is 0 go on
include 'status_1.php'; //set status to 1
...
include 'status_0.php'; //after finished operation set status back to 0
} else { //if status is 1 say that its 1
echo "MySQL DB is in use (status ". $status .")";
die;
}