par
Invité » 25 août 2006, 19:16
Désolé, j'oubliais les bonnes manières;
Bonjours à tous, j'ai un problême, pouvez-vous m'aider
Voici mon code:
Code : Tout sélectionner
<?php
if (!($_SERVER['PHP_AUTH_USER']=="essai" &&
$_SERVER['PHP_AUTH_PW']=="essai"))
{
header("status: 401 Unauthorized");
header("HTTP/1.0 401 Unauthorized");
header("WWW-authenticate: Basic realm="acces securise au back-office"");
print("Vérification: ERREUR");
exit(0);
}
print("Vérification: OK");
?>
Dans le navigateur cela m'affiche:
Notice: Undefined index: PHP_AUTH_USER in c:\documents and settings\sebastien\mes documents\kochi\test\authentification.php on line 3
À quoi cela est-il dû?
Désolé, j'oubliais les bonnes manières;
Bonjours à tous, j'ai un problême, pouvez-vous m'aider :P
[quote="Kochi"]Voici mon code:
[code]<?php
if (!($_SERVER['PHP_AUTH_USER']=="essai" &&
$_SERVER['PHP_AUTH_PW']=="essai"))
{
header("status: 401 Unauthorized");
header("HTTP/1.0 401 Unauthorized");
header("WWW-authenticate: Basic realm="acces securise au back-office"");
print("Vérification: ERREUR");
exit(0);
}
print("Vérification: OK");
?>[/code]
Dans le navigateur cela m'affiche:
Notice: Undefined index: PHP_AUTH_USER in c:\documents and settings\sebastien\mes documents\kochi\test\authentification.php on line 3
À quoi cela est-il dû?[/quote]