用密码保护文件夹的最佳方法?
我正在尝试创建与 Cpanel 密码保护目录类似的方式,其中会弹出一个窗口,询问用户输入用户名和密码,但 Cpanel 方式很棒,但我的客户不知道如何做到这一点,所以我想创建一个弹出消息框,通知访问者输入用户名和密码,但我完全不知道如何创建它,以及类似于 CPanel 的编程语言支持
I am trying to create a similar way to Cpanel password protect directory, where a pop up comes out asking the user for a username and a password, but Cpanel way is amazing but my client doesn't know anything on how to do that, so i wanted to create a pop up msgbox informing the visitor to enter a user name and a password, and i totaly confused on how to create it, and which programming language support similar to CPanel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用基本身份验证创建 .htaccess(从 Web 浏览器运行)。
您必须创建用户和密码文件。你可能会在网上找到很多关于它的手册。
例如: http://www.elated.com/文章/使用 htaccess 密码保护您的页面/
Create .htaccess With basic authentication (running from web browser).
You must create users and password file. You may fing many maunals on web about it.
For example: http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/
您需要使用 .htaccess 来保护页面。
此处有关于如何执行此操作的指南。
You'll want to protect the page with .htaccess.
There is a guide on how to do this here.