Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1377 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  WWW-Authenticate sur Free... marche pô ??

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

WWW-Authenticate sur Free... marche pô ??

n°371857
xkamui
Their Destiny Was Foreordained
Posté le 25-04-2003 à 14:44:45  profilanswer
 

je programme une ça sur free en php3 :  
 

Code :
  1. <?
  2. if (!isset($PHP_AUTH_USER))
  3. {
  4. header("WWW-Authenticate: Basic realm=\"Entrez votre login et mot de passe\"" );
  5. header("HTTP/1.0 401 Unauthorized" );
  6. echo "<a href=\"http://kamui.studio.free.fr/index.php\">cliquez ici</a>";
  7. exit;
  8. }
  9. else
  10. {
  11. include ("../inc/cnx.inc" );
  12. $sql_pwd=@mysql_query("select id from admin where login like '$PHP_AUTH_USER' and passwd like '$PHP_AUTH_PW'" );
  13. $nb=@mysql_numrows($sql_pwd);
  14. if ($nb<=0)
  15.   {
  16.   header("WWW-Authenticate: Basic realm=\"Entrez votre login et mot de passe\"" );
  17.   header("HTTP/1.0 401 Unauthorized" );
  18.   echo "<a href=\"http://kamui.studio.free.fr/index.php\">cliquez ici</a>";
  19.   exit;
  20.   }
  21. }
  22. ?>


 
ç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
mood
Publicité
Posté le 25-04-2003 à 14:44:45  profilanswer
 

n°378003
xkamui
Their Destiny Was Foreordained
Posté le 30-04-2003 à 12:21:50  profilanswer
 

[:dofor] up pliz [:dofor]


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  WWW-Authenticate sur Free... marche pô ??

 

Sujets relatifs
[XML + DOM] fonction writetofile() ne marche pasdeveloppement qt : mon qmake marche pas !!
[html] Pourquoi ca ne marche pas ca (?) :[php/Mysql] Free peu meme pa faire une requete
www.cppfrance.com ne marche plus?comment marche le fpu ?
Formulaire email php fonctionnant sous free[PHP-MySQL] Quel portail utiliser chez free ?
[PhP et Free] Session_start et header locationComment ca marche les include...
Plus de sujets relatifs à : WWW-Authenticate sur Free... marche pô ??


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR