zendでhttpauthを実行したいのですが、その記事http://framework.zend.com/manual/en/zend.auth.adapter.http.htmlを読みましたが、その価値はないと思います(なぜパスワードなのか)外部ファイルから取得...?)。私はそれがヘッダーで簡単にできることを知っています:
header('WWW-Authenticate: Basic realm=sdfsdf');
header('HTTP/1.0 401 Unauthorized');
die;
しかし、Zendを使用しているので、変換したいと思います。
$response->setHeader('WWW-Authenticate', 'Basic realm="asda"', true);
$response->setHeader('Status', '401 Unauthorized', true);
それはそれを受け入れません、何も起こりません。die();
動作しても、この直後は使えません。誰かが抜け道を示すことができますか?