关键代码:
define("READ", 1);
define("WRITE", 2);
define("DELETE", 4);
define("UPDATE", 8);
// 赋予权限
$permission = READ|WRITE;
//判断权限
if( READ & $permission ){
echo "ok";
}
时间: 2024-10-10 07:43:27
关键代码:
define("READ", 1);
define("WRITE", 2);
define("DELETE", 4);
define("UPDATE", 8);
// 赋予权限
$permission = READ|WRITE;
//判断权限
if( READ & $permission ){
echo "ok";
}