当前位置: 首页>>代码示例>>PHP>>正文


PHP Flux::initialize方法代码示例

本文整理汇总了PHP中Flux::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Flux::initialize方法的具体用法?PHP Flux::initialize怎么用?PHP Flux::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Flux的用法示例。


在下文中一共展示了Flux::initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Flux_Error

require_once 'Flux/Dispatcher.php';
require_once 'Flux/SessionData.php';
require_once 'Flux/DataObject.php';
require_once 'Flux/Authorization.php';
require_once 'Flux/Installer.php';
require_once 'Flux/PermissionError.php';
// Vendor libraries.
require_once 'markdown/markdown.php';
try {
    if (!extension_loaded('pdo')) {
        throw new Flux_Error('The PDO extension is required to use Flux, please make sure it is installed along with the PDO_MYSQL driver.');
    } elseif (!extension_loaded('pdo_mysql')) {
        throw new Flux_Error('The PDO_MYSQL driver for the PDO extension must be installed to use Flux.  Please consult the PHP manual for installation instructions.');
    }
    // Initialize Flux.
    Flux::initialize(array('appConfigFile' => FLUX_CONFIG_DIR . '/application.php', 'serversConfigFile' => FLUX_CONFIG_DIR . '/servers.php'));
    // Set time limit.
    set_time_limit((int) Flux::config('ScriptTimeLimit'));
    // Set default timezone for entire app.
    $timezone = Flux::config('DateDefaultTimezone');
    if ($timezone && !@date_default_timezone_set($timezone)) {
        throw new Flux_Error("'{$timezone}' is not a valid timezone.  Consult http://php.net/timezones for a list of valid timezones.");
    }
    // Create some basic directories.
    $directories = array(FLUX_DATA_DIR . '/logs/schemas', FLUX_DATA_DIR . '/logs/schemas/logindb', FLUX_DATA_DIR . '/logs/schemas/charmapdb', FLUX_DATA_DIR . '/logs/transactions', FLUX_DATA_DIR . '/logs/mail', FLUX_DATA_DIR . '/logs/mysql', FLUX_DATA_DIR . '/logs/mysql/errors', FLUX_DATA_DIR . '/logs/errors', FLUX_DATA_DIR . '/logs/errors/exceptions', FLUX_DATA_DIR . '/logs/errors/mail');
    // Schema log directories.
    foreach (Flux::$loginAthenaGroupRegistry as $serverName => $loginAthenaGroup) {
        $directories[] = FLUX_DATA_DIR . "/logs/schemas/logindb/{$serverName}";
        $directories[] = FLUX_DATA_DIR . "/logs/schemas/charmapdb/{$serverName}";
        foreach ($loginAthenaGroup->athenaServers as $athenaServer) {
            $directories[] = FLUX_DATA_DIR . "/logs/schemas/charmapdb/{$serverName}/{$athenaServer->serverName}";
开发者ID:AcidSlide,项目名称:FluxCP,代码行数:31,代码来源:index.php


注:本文中的Flux::initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。