Показать сообщение отдельно
Старый 27.03.2003, 06:54     # 1
TERROR | *Punk-
Guest
 
Сообщения: n/a

Как фигня творится....

Дарова всем!

Короче вот скрипт:
PHP код:
<?
if (($PHP_AUTH_USER == 'login') && ($PHP_AUTH_PW == 'password')) { unset($auth); $auth 1; }

if (!
$auth) {
   
header("WWW-Authenticate: Basic realm=\"WCG External Realm\"");
   
header("HTTP/1.0 401 Unauthorized");
   echo 
'Sorry, but you must enter a password before .';
   exit;
   }
?>
запускаю его и мне пишут:
Warning: Cannot add header information - headers already sent by (output started at d:\usr\local\apache\apache\htdocs\auth.php:2) in d:\usr\local\apache\apache\htdocs\auth.php on line 5

Warning: Cannot add header information - headers already sent by (output started at d:\usr\local\apache\apache\htdocs\auth.php:2) in d:\usr\local\apache\apache\htdocs\auth.php on line 6
Sorry, but you must enter a password before .

то ли я ламо, то ли апач глючит, то ли еще чего.
Народ помогите!