Bonjour, alors je voudrais mettre en place un ptit test d'authentification avec les en-tetes header et pour ça j'ai un script tout con pour tester si ça marche mais ça foire...
<?php
if( ($_SERVER['PHP_AUTH_USER']!="admin") || ($_SERVER['PHP_AUTH_PW']!="admin") )
{
header("WWW-Authenticate: Basic realm='Gestion des alertes'");
header("HTTP/1.0 401 Unauthorized");
exit;
}
else
{
//La j'ai tout mis en comm...
}
?>
Voila et ça me dit :
Notice: Undefined index: PHP_AUTH_USER in
c:\program files\easyphp1-8\www\rp manager\affichalerte.php on line
2Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\rp manager\affichalerte.php:2) in
c:\program files\easyphp1-8\www\rp manager\affichalerte.php on line
4Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\rp manager\affichalerte.php:2) in
c:\program files\easyphp1-8\www\rp manager\affichalerte.php on line
5
Je précise que ma variable register_globals = Off et que j'utilise easyphp 1-8
Merci de m'aider j'ai essayer dans tous les sens, mais rien ne marche !!!
Help pleazzzzz
