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


PHP GlobalConfig::APP_ROOT方法代碼示例

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


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

示例1: realpath

 *
 * This file contains application-wide configuration settings.  The settings
 * here will be the same regardless of the machine on which the app is running.
 *
 * This configuration should be added to version control.
 *
 * No settings should be added to this file that would need to be changed
 * on a per-machine basic (ie local, staging or production).  Any
 * machine-specific settings should be added to _machine_config.php
 */
/**
 * APPLICATION ROOT DIRECTORY
 * If the application doesn't detect this correctly then it can be set explicitly
 */
if (!GlobalConfig::$APP_ROOT) {
    GlobalConfig::$APP_ROOT = realpath("./");
}
/**
 * INCLUDE PATH
 * Adjust the include path as necessary so PHP can locate required libraries
 */
set_include_path(GlobalConfig::$APP_ROOT . '/libs/' . PATH_SEPARATOR . GlobalConfig::$APP_ROOT . '/../libs/' . PATH_SEPARATOR . get_include_path());
/**
 * RENDER ENGINE
 */
require_once 'verysimple/Phreeze/SavantRenderEngine.php';
GlobalConfig::$TEMPLATE_ENGINE = 'SavantRenderEngine';
GlobalConfig::$TEMPLATE_PATH = GlobalConfig::$APP_ROOT . '/templates/';
GlobalConfig::$TEMPLATE_CACHE_PATH = '';
/**
 * ROUTE MAP
開發者ID:yaroing,項目名稱:phreeze,代碼行數:31,代碼來源:_app_config.php


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