![](/img/trans.png)
[英]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.