.htaccess
#绝对位置 AuthUserFile D:/phpStudy/WWW/test_htaccess/.htpasswd AuthType Basic AuthName "restricted" Order Deny,Allow Deny from all Require valid-user Satisfy any
.htpasswd
fly:apr1 8o5QSoJ.$I8fFOb12VkhL5V3mlZtgm.index.php
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>测试文件</title> </head> <body> <div align="center"> 恭喜你,你访问到本目录下的文件了! </div> </body> </html>
测试地址:/test_htaccess/(用户名:ccp330;密码:1234567)
.htaccess .htpasswd 访问密码设置
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.