basic認証

<?php 

switch (true){
  case !isset($_SERVER&#91;'PHP_AUTH_USER'&#93;, $_SERVER&#91;'PHP_AUTH_PW'&#93;):
  case $_SERVER&#91;'PHP_AUTH_USER'&#93; !== 'admin':
  case $_SERVER&#91;'PHP_AUTH_PW'&#93; !== 'test':
    header('WWW-Authenticate: Basic realm="Enter username and password."');
    header('Content-Type: text/plain; charset=utf-8');
    die('このページを見るにはログインが必要です');
}
header('Content-Type: text/html; charset=utf-8');

?>