[英]Need to integrate SSO in PHP with the help of Windows authentication
[英](PHP) Help for authentication
如何添加更多可以进行身份验证以回显“访问”的值
除了“a”之外,还添加了更多变量,以便我可以输入http://url/file.php?auth=a
OR auth=b
OR auth=c
等。
我的代码:
<?php
$auth = ("a");
if(@$_REQUEST["auth"]!="$auth"){
echo ("ACCESS DENIED");
}
else {
echo "ACCESS";
}
?>
我想你想要in_array
:
$auth = array('a', 'b', 'c');
if (!in_array(@$_REQUEST["auth"], $auth)) {
echo ("ACCESS DENIED");
}
else {
echo "ACCESS";
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.