本文整理汇总了PHP中app::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP app::getInstance方法的具体用法?PHP app::getInstance怎么用?PHP app::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::getInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mb_internal_encoding
<?php
require_once "fn.php";
$CONFIG = (require "config.php");
try {
DEBUG::start();
mb_internal_encoding("UTF-8");
setlocale(LC_ALL, "ru_RU.UTF-8");
$app = app::getInstance();
$app->setConfig($CONFIG);
$app->setAjax($_REQUEST["ajax"]);
$app->run();
$app->display();
DEBUG::finish();
if (($_REQUEST["debug"] || $CONFIG["debug"]) && !$_REQUEST["ajax"]) {
echo DEBUG::out($CONFIG["debug_format"]);
}
} catch (Exception $e) {
$str = "Unspecified fatal exception: " . $e->getMessage() . "\nException occurs in file " . $e->getFile() . " on line " . $e->getLine() . "\n\n";
if ($_REQUEST["ajax"]) {
echo "var error=\"" . my_js_conv($str) . "\"; ";
} else {
echo str_replace("\n", "<br />", $str);
}
file_put_contents($CONFIG["tmp_dir"] . "/error.log", date("Y-m-d h:i:s") . " - " . $str, FILE_APPEND);
}
示例2: error_reporting
<?php
/// And the boot begun
error_reporting(E_ALL);
session_start();
mb_internal_encoding('UTF-8');
define('__EVA__', 'AEON Web Engine');
define('__VERSION__', 'v2');
define('__ROOT__', dirname(__DIR__));
define('__NGN__', __ROOT__ . '/system');
define('__SYSTEM__', __NGN__);
define('__HELPERS__', __ROOT__ . '/helpers');
define('__APP__', __ROOT__ . '/application');
define('__HOST__', '//' . $_SERVER['HTTP_HOST']);
define('__APC__', !!function_exists('apc_exists'));
define('__PROTOCOL__', !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http');
ob_start();
include __SYSTEM__ . '/aeon.php';
include __SYSTEM__ . '/aeon.headers.php';
include __SYSTEM__ . '/aeon.tracer.php';
include __SYSTEM__ . '/aeon.router.php';
include __SYSTEM__ . '/aeon.loader.php';
include __SYSTEM__ . '/aeon.engine.php';
ob_end_clean();
\app::getInstance();
/// Copyright © 2014-2015 Чернов, Александр. Contacts: <aeonrush@live.ru>, <black_web@outlook.com>
/// License: http://www.apache.org/licenses/LICENSE-2.0