$username="Administrator@zb.com";
$username="123456";
if ($ds) {
if($bind = ldap_bind($ds, $username, $password))
{
//登录成功
session_start();
header("Location: index.php"); //跳转到index.php页面
ldap_close($ds);
}
else
{
echo "登录失败";
echo "<script type="text/javascript">alert("帐号或密码错误");</script>";
ldap_close($ds);
}
}
else
{
echo "无法连接Domain";
}
[php与ldap]PHP与LDAP登录相关 ( Win 2008 R2 Server Domain Controller )
http://m.bbyears.com/wangyezhizuo/35475.html
推荐访问: