je programme une ça sur free en php3 :
Code :
- <?
- if (!isset($PHP_AUTH_USER))
- {
- header("WWW-Authenticate: Basic realm=\"Entrez votre login et mot de passe\"" );
- header("HTTP/1.0 401 Unauthorized" );
- echo "<a href=\"http://kamui.studio.free.fr/index.php\">cliquez ici</a>";
- exit;
- }
- else
- {
- include ("../inc/cnx.inc" );
- $sql_pwd=@mysql_query("select id from admin where login like '$PHP_AUTH_USER' and passwd like '$PHP_AUTH_PW'" );
- $nb=@mysql_numrows($sql_pwd);
- if ($nb<=0)
- {
- header("WWW-Authenticate: Basic realm=\"Entrez votre login et mot de passe\"" );
- header("HTTP/1.0 401 Unauthorized" );
- echo "<a href=\"http://kamui.studio.free.fr/index.php\">cliquez ici</a>";
- exit;
- }
- }
- ?>
|
ça marche parfaitement en local, avec easyphp 1.6, mais sur free, ça ma met '500 Internal Server Error'
pkoi et comment ??
Message édité par xkamui le 02-05-2003 à 03:08:13