✔ 最佳答案
you mean want to logout? Try this:
header('WWW-Authenticate: Basic realm="This Realm"');
header('HTTP/1.0 401 Unauthorized‘);
// if a session was running, clear and destroy it
session_start();
session_unset();
session_destroy();
You can find more examples in the original PHP site
http://hk2.php.net/features.http-auth