當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Doo::acl方法代碼示例

本文整理匯總了PHP中Doo::acl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doo::acl方法的具體用法?PHP Doo::acl怎麽用?PHP Doo::acl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Doo的用法示例。


在下文中一共展示了Doo::acl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: str_replace

$config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $config['SITE_PATH']));
if (strpos($config['SUBFOLDER'], '/') !== 0) {
    $config['SUBFOLDER'] = '/' . $config['SUBFOLDER'];
}
$config['APP_URL'] = 'http://' . $_SERVER['HTTP_HOST'] . $config['SUBFOLDER'];
$config['DEBUG_ENABLED'] = FALSE;
$config['ERROR_404_ROUTE'] = '/404.htm';
$config['AUTOROUTE'] = true;
require_once $config['BASE_PATH'] . 'Doo.php';
require_once $config['BASE_PATH'] . 'app/DooConfig.php';
include PROJECT_ROOT . 'config/route.php';
if (file_exists(PROJECT_ROOT . 'config/db.php')) {
    require_once PROJECT_ROOT . 'config/db.php';
} else {
    require_once LUA_ROOT . ADMIN_ROOT . '/config/db.php';
}
if (file_exists(PROJECT_ROOT . 'config/acl.php')) {
    require_once PROJECT_ROOT . 'config/acl.php';
} else {
    require_once LUA_ROOT . ADMIN_ROOT . '/config/acl.php';
}
Doo::acl()->rules = $acl;
Doo::acl()->defaultFailedRoute = '/' . SYSNAME . '/401.htm';
Doo::conf()->set($config);
require_once $config['BASE_PATH'] . 'diagnostic/debug.php';
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
Doo::db()->sql_tracking = true;
Doo::app()->route = $route;
Doo::loadClass('Lua', false, ADMIN_ROOT);
ob_start();
Doo::app()->run();
開發者ID:lianren,項目名稱:doophp.cms,代碼行數:31,代碼來源:Lua.php

示例2: acl

 /**
  * Returns the Acl singleton, shorthand to Doo::acl()
  * @return DooAcl
  */
 public function acl()
 {
     return Doo::acl();
 }
開發者ID:mindaugas-valinskis,項目名稱:doophp,代碼行數:8,代碼來源:deploy.php

示例3:

<?php

include './protected/config/common.conf.php';
include './protected/config/routes.conf.php';
include './protected/config/db.conf.php';
include './protected/config/acl.conf.php';
#Just include this for production mode
//include $config['BASE_PATH'].'deployment/deploy.php';
include $config['BASE_PATH'] . 'Doo.php';
include $config['BASE_PATH'] . 'app/DooConfig.php';
Doo::conf()->set($config);
include $config['BASE_PATH'] . 'diagnostic/debug.php';
Doo::acl()->rules = $acl;
Doo::acl()->defaultFailedRoute = '/error';
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
//Doo::db()->sql_tracking = true;
Doo::app()->route = $route;
Doo::app()->run();
開發者ID:mindaugas-valinskis,項目名稱:doophp,代碼行數:18,代碼來源:index.php


注:本文中的Doo::acl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。