Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/07/2004, 13:09
Roly
 
Fecha de Ingreso: febrero-2004
Ubicación: Resistencia - Argentina
Mensajes: 299
Antigüedad: 20 años, 1 mes
Puntos: 0
Autentificacion HTTP

Trate de hacer correr el ejemplo de al documentacion:

<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}
?>

pero no puedo hacerlo andar, estoy haciendolo en Dreamwaver y al poner $_SERVER no aparecen las variables 'PHP_AUTH_USER' y 'PHP_AUTH_PW'

Si alguien sabe como hacerlo estaria agradecido.-