Home  >  Article  >  Backend Development  >  关于TP的RBAC的使用,TPRBAC_PHP教程

关于TP的RBAC的使用,TPRBAC_PHP教程

WBOY
WBOYOriginal
2016-07-12 09:00:47877browse

关于TP的RBAC的使用,TPRBAC

  如果你是一个TP的重度使用者的话,请自动略过笔者以下文字

      权限管理我在成为一个开发者1年半内,接触过2种,一种就是数学方式 比如我们文件夹权限的755这种权限管理的方式,这种二进制的权限管理的方式 无耻得引入  http://www.cnblogs.com/qfcndtt/archive/2012/08/03/2621713.html这里讲解的也比较详细,不过这种方式适合于权限节点相对较少的系统。也很轻便。

  下面正式开始THINKPHP的RBAC的讲解

  在系统目录下的Librar/Org/Util目录下的Rbac.class.php

  在config中

  拥有着RBAC的相关的配置文件

  

  数据库的话,我以我现在的一个系统为例

  角色表 role 

  

  用户对应的角色表 role_user

  

  节点表 node

  关于TP的RBAC的使用,TPRBAC_PHP教程

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