當ldap_bind上的憑據無效時,是否可以避免在屏幕上顯示php警告,但是沒有將@ldap_bind或error_reporting設置爲0?php ldap綁定警告
我試着用:
try {
if(!ldap_bind($ds, $binddn, $password)) {
throw new Exception('Invalid credentials');
}
} catch (Exception $e) {
var_dump($e->getMessage());
}
但它不工作。 PHP警告仍在屏幕上。
有誰知道解決方案?