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

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

WBOY
WBOYOriginal
2016-06-13 10:04:251521browse

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

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

Statement:
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