Php single entry permission check. Functioncheckprive () {$ M $ _ SESSION [prive_list]; model permission $ A $ _ SESSION [action]; Operation permission $ UrlM $ _ GET [m]; $ _ GET model $ UrlA $ _ GET [a]; $ _ GET operation if (strp function checkprive (){
$ M = $ _ SESSION ['prive _ list']; // model permission
$ A = $ _ SESSION ['action']; // operation permission
$ UrlM = $ _ GET ['M']; // $ _ GET model
$ UrlA = $ _ GET ['A']; // $ _ GET
If (strpos ($ M ['M'], $ UrlM )! = False | $ M ['M'] = 'all '){
If (strpos ($ A ['A'], $ UrlA )! = False | $ A ['A'] = 'all') return true;
Exit ("script" alert ('you do not have this operation permission! '); History. go (-1) script ");
Return false;
} Else {
Exit ("script" alert ('you do not have permission for this module! '); History. go (-1) script ");
Return false;
}
}
From chaojie2009
Http://www.bkjia.com/PHPjc/478389.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/478389.htmlTechArticlefunction checkprive () {$ M =$ _ SESSION [prive_list]; // model permission $ A =$ _ SESSION [action]; // operation permission $ UrlM =$ _ GET [m]; // $ _ GET model $ UrlA =$ _ GET [a]; // $ _ GET operation if (strp...