$PHP_AUTH_USER
Posted: Sun Sep 07, 2008 1:14 am
hi everyone,
I cannot get access granted with this code can someone please help me.
<?php // Manual de PHP
if (($PHP_AUTH_USER!="Joe") || ($PHP_AUTH_PW!="123")) {
header('WWW-Authenticate: Basic realm="Acceso restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
?>
<!-- Manual de PHP -->
<html>
<head>
<title>Ejemplo de PHP</title>
</head>
<body>
Ha conseguido el acceso a la <B>zona restringida</B>.[/color]
</body>
</html>
http://www.milenioveracruz.com.mx/test2.php
I cannot get access granted with this code can someone please help me.
<?php // Manual de PHP
if (($PHP_AUTH_USER!="Joe") || ($PHP_AUTH_PW!="123")) {
header('WWW-Authenticate: Basic realm="Acceso restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
?>
<!-- Manual de PHP -->
<html>
<head>
<title>Ejemplo de PHP</title>
</head>
<body>
Ha conseguido el acceso a la <B>zona restringida</B>.[/color]
</body>
</html>
http://www.milenioveracruz.com.mx/test2.php