⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 authenticate.inc

📁 《SQL Server 2000课程设计案例精编》-李昆-源代码-3436
💻 INC
字号:
<?php
//---------------------------
// 用户认证函数    auth.inc
// Author: Wilson Peng
//        Copyright (C) 1999
//---------------------------
$handle=fopen("./include/passwd.txt","r");
$auth=fgets($handle);
$temp=explode(":",$auth);
if(!(isset($_SERVER["PHP_AUTH_USER"])&&($_SERVER["PHP_AUTH_USER"]==$temp[0]&&$_SERVER["PHP_AUTH_PW"]==$temp[1]))) {
	header('WWW-Authenticate: Basic realm="Power User"');
	header("HTTP/1.0 401 Anauthorized");
	echo "请和管理员联系";
	exit;
}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -