Home > Backend Development > PHP Tutorial > thinkphp中若未登录,则不允许访问任何方法,怎么实现

thinkphp中若未登录,则不允许访问任何方法,怎么实现

WBOY
Release: 2016-06-13 13:49:47
Original
1104 people have browsed it

thinkphp中若未登录,则不允许访问任何方法,如何实现?
可以写一个CommonAction类验证是否登录,若无登录,则不能访问任何方法和模块,如何做?
不用rbac自己实现呢?

------解决方案--------------------
可以使用zend提供的acl类文件,没有登录,则没有任何权限
------解决方案--------------------
CommonAction的_initialize()里写登录验证代码呗

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template