Why I can't use header('HTTP/1.0 401 Unauthorized'); ???
| From: | Ning Xu | Date: | Wed, 19 Jul 2000 19:17:30 +0000 |
| Subject: | Why I can't use header('HTTP/1.0 401 Unauthorized'); ??? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1175@lists.php.net to get a copy of this message | ||
The following is the code at the very beginning of a php3 file.
<?php
if (!isset($PHP_AUTH_USER)) {
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
... ...
Here is the error information in apache's error.log:
[Wed Jul 19 13:58:42 2000] [error] [client 130.126.118.52] malformed header
from script. Bad header=HTTP/1.0 401 Unauthorized: c:/php3/php.exe
Can anybody help me about this? Thanks a lot!