Why are $_SERVER[“PHP_AUTH_USER”] and $_SERVER[“PHP_AUTH_PW”] not set?
问题 Before I begin, I'd like to point out that I've browsed Stack Overflow and found other similar questions - PHP_AUTH_USER not set? and HTTP Auth via PHP - PHP_AUTH_USER not set? - and these have pointed out that the authentication $_SERVER variables won't be set if ''Server API'' is set to ''CGI/FCGI'', but I checked my ''phpinfo()'' output and my ''Server API'' is set to ''Apache 2.0 Handler''. Ok so I have a simple script as follows: <?php echo "Username: " . $_SERVER["PHP_AUTH_USER"] . ",