保护整个目录 - PHP身份验证 [英] Protecting a whole directory - PHP Authentication

查看:77
本文介绍了保护整个目录 - PHP身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何保护整个目录,例如
http:/ /www.example.com/members/ 和所有子目录登录

保护?我不想在每个目录中放一个.php脚本和

我想保护所有文件类型

How would I go about protecting a whole directory, e.g.
http://www.example.com/members/ and all sub-directories with login
protection? I wouldn''t like to put a .php script in each directory and
I''d like to protect all file-types

推荐答案

ro ********* @ googlemail.com 写道:

我将如何保护整个目录,例如
http://www.example.com/members/ 以及所有登录

保护的子目录?我不想在每个目录中放一个.php脚本和

我想保护所有文件类型
How would I go about protecting a whole directory, e.g.
http://www.example.com/members/ and all sub-directories with login
protection? I wouldn''t like to put a .php script in each directory and
I''d like to protect all file-types






如果您使用Apache,请查看.htaccess。

Google周围有很多文章。


问候,

Erwin Moller

Hi,

If you use Apache, have a look at .htaccess.
Google around, many articles.

Regards,
Erwin Moller


8月23日下午6:42,Erwin Moller

< ; Since_humans_read_this_I_am_spammed_too_m ... @ spam yourself.comwrote:
On Aug 23, 6:42 pm, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:




如果您使用Apache,请查看.htaccess。

谷歌,很多文章。


问候,

Erwin Moller
Hi,

If you use Apache, have a look at .htaccess.
Google around, many articles.

Regards,
Erwin Moller



准备使用.htaccess但我需要更好的用户管理

与MySQL数据库,注册页面,管理页面,忘记密码

功能。


编写一个每分钟运行一次的脚本并将用户/传递转储到

a .htpasswd文件过于沉重高流量网站?

Was going to use .htaccess but I''d require a better user management
with MySQL database, registeration page, admin page, forgot password
feature.

Would coding a script that runs every minute and dumps user/pass to
a .htpasswd file be too taxing on a high traffic site?


8月23日下午1:00,rogerjam ... @ googlemail.com写道:
On Aug 23, 1:00 pm, rogerjam...@googlemail.com wrote:

8月23日下午6:42,Erwin Moller


< Since_humans_read_this_I_am_spammed_too_m ... @ spam yourself.comwrote:
On Aug 23, 6:42 pm, Erwin Moller

<Since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:

您好,
Hi,


如果您使用Apache,请查看.htaccess。

谷歌周围,很多文章。
If you use Apache, have a look at .htaccess.
Google around, many articles.


问候,

Erwin Moller
Regards,
Erwin Moller



去了使用.htaccess但我需要更好的用户管理

与MySQL数据库,注册页面,管理页面,忘记密码

功能。


编写一个每分钟运行一次的脚本并将用户/传递转储到

a .htpasswd文件会对高流量网站造成太大的负担吗?


Was going to use .htaccess but I''d require a better user management
with MySQL database, registeration page, admin page, forgot password
feature.

Would coding a script that runs every minute and dumps user/pass to
a .htpasswd file be too taxing on a high traffic site?



你可能会想到的一件事是:自.htaccess,.htpasswd

文件已经采用相当严格的格式,你可以非常容易

解析它,并且当

数据库更新时,只需更新.hpasswd文件中的条目。基本上,保持.htpasswd文件和数据库

并发。

One thing you might think about is this: since .htaccess, .htpasswd
files are already in a fairly strict format, you can pretty easily
parse it, and simply update entries in the .hpasswd file when the
database updates. Basically, keep the .htpasswd file and the database
concurrent.


这篇关于保护整个目录 - PHP身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆