bea*_*ear 2 php if-statement function
我正在使用此功能来确定我的应用程序是在线还是离线:
function online() {
if ($online == "0") {
if($_SESSION['exp_user']['userlevel'] != "1") {
include("error/offline.php");
exit();
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是,如果数据库中的数据值设置为0,并且$online='0',为什么那些用户级别不是1的用户不包含error/offline.php?
谢谢 :)