Jump to content
php.lv forumi

Auth http problēma, lūdzu palīdzam :)


EdgarsK

Recommended Posts

Sveiki mans kods

<?php
$userlist=array(
md5('kein=parole01'),
md5('foxc=parole01')
);
if(!isset($_SERVER['PHP_AUTH_USER'])) {
   header('WWW-Authenticate: Basic realm="My Realm"');
   header('HTTP/1.0 401 Unauthorized');
   echo "[security] - Pieeja liegta / ".$this->configs[main][site_title].' administrācija.';
   exit;
 }else{
   $user=$_SERVER['PHP_AUTH_USER'];
   $pass=$_SERVER['PHP_AUTH_PW'];
   $integer=md5($user.'='.$pass);
   if(in_array($integer,$userlist)) {
     unset($integer);
   }else{
     unset($_SERVER['PHP_AUTH_USER']);
     unset($_SERVER['PHP_AUTH_PW']);
     header("Location: ".$this->configs[main][site_http]."/op");
   }
 }
?>

 

Kļūda: Lapa netiek korekti pāradresēta

 

kā lai pareizi pāradresēju?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...