浏览网站时,PHP登录和特权继续 [英] PHP Login and priviliges continuted when navigating site
问题描述
你好.
如何创建一个(对于管理员而言)登录名的管理员,然后允许他们登录,然后仅对已登录的管理员显示某个页面链接.另外,如何确保管理员用户可以登录,直到不活动或注销.
例如,我正在创建一个网站,成员可以在该网站上注册并发布在讨论板上.我希望能够为具有管理员帐户的用户提供对此链接的唯一访问权限(防止普通用户编辑或删除成员和帖子).但是,我也想阻止普通用户输入管理页面URL,这将使他们能够访问该页面.
最重要的是,我想知道是否有人知道如何让管理员保持登录状态,直到他们注销或会话超时.
谢谢,
Joel.
Hi there.
How does one create a log in (for an admin) that allows them to log in and then a certain page link is shown only for the logged in admin. Also, how can I ensure that the admin user will be logged in until inactive or logged out.
For example, I''m creating a website where members can sign up and post on a discussion board. I want to be able to give users with admin accounts the only access to this link (preventing regular users from editing or deleting members and posts). However, I also want to prevent regular users from typing in the admin page URL which would give them access to that page.
On top of all that I was wondering if anyone knows how I can keep the admin logged in until they log out or are timed out of the session.
Thanks,
Joel.
推荐答案
因此,您可以使用会话处理在PHP中完成上面提到的某些过程,一个由admin登录的用户,为该URL生成一个单独的URL.管理员的用法,并使其成为其他用户所不知道的.-这是我对您所提问题的建议.
So you can make some of your process mentioned above can be done in PHP by using session handling, Ones the admin logged in, generate a separate URL for the admin usage separately and make this will be unknown form other user .- this is my suggestion up to what I understand your question.
这篇关于浏览网站时,PHP登录和特权继续的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!