查看單個文章
  #1  
舊 2006-05-17, 05:50 PM
vivi5945 vivi5945 目前離線
初級會員
 
註冊日期: 2006-04-11
文章: 5
預設 <求助>php語言之http網頁認證無法......

網頁出現輸入username和password(排除輸入錯誤的可能性)三次後就
無後續動作,能幫我看錯在那嗎???謝謝!!!!




<?php

require "config.php";

if (!$PHP_AUTH_USER || !$PHP_AUTH_PW)
{
header('WWW-Authenticate: Basic realm="uDi Admin"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
else
{
$tu = strtolower($PHP_AUTH_USER);
$pu = strtolower($PHP_AUTH_PW);
if ($tu == strtolower($adminusername) && $pu == strtolower($adminpass))
{
$dirname = "$credir";
$dh = opendir($dirname);


print "<html>
<body>
<center>";
// START FUNCTIONS
回覆時引用此篇文章