本文整理汇总了PHP中Debugger::start方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::start方法的具体用法?PHP Debugger::start怎么用?PHP Debugger::start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debugger
的用法示例。
在下文中一共展示了Debugger::start方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* The front controller only has one static method, `run()`, which
*
*/
public static function run ($argv, $argc) {
/**
* For compatibility with PHP 5.4's built-in web server, we bypass
* the front controller for requests with file extensions and
* return false.
*/
if (php_sapi_name () === 'cli-server' && isset ($_SERVER['REQUEST_URI']) && preg_match ('/\.[a-zA-Z0-9]+$/', parse_url ($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
return false;
}
/**
* Normalize slashes for servers that are still poorly
* configured...
*/
if (get_magic_quotes_gpc ()) {
function stripslashes_gpc (&$value) {
$value = stripslashes ($value);
}
array_walk_recursive ($_GET, 'stripslashes_gpc');
array_walk_recursive ($_POST, 'stripslashes_gpc');
array_walk_recursive ($_COOKIE, 'stripslashes_gpc');
array_walk_recursive ($_REQUEST, 'stripslashes_gpc');
}
/**
* Check ELEFANT_ENV environment variable to determine which
* configuration to load. Also include the Elefant version,
* autoloader, and core functions, and set the default
* timezone to avoid warnings in date functions.
*/
define ('ELEFANT_ENV', getenv ('ELEFANT_ENV') ? getenv ('ELEFANT_ENV') : 'config');
require ('conf/version.php');
require ('lib/Autoloader.php');
require ('lib/Functions.php');
date_default_timezone_set(conf ('General', 'timezone'));
ini_set ('session.cookie_httponly', 1);
ini_set ('session.use_only_cookies', 1);
/**
* Set the default error reporting level to All except Notices,
* and turn off displaying errors. Error handling/debugging can
* be done by setting conf[General][debug] to true, causing full
* debug traces to be displayed with highlighted code in the
* browser (*for development purposes only*), or by checking
* the error log for errors.
*/
error_reporting (E_ALL & ~E_NOTICE);
if (conf ('General', 'display_errors')) {
ini_set ('display_errors', 'On');
} else {
ini_set ('display_errors', 'Off');
}
/**
* Enable the debugger if conf[General][debug] is true.
*/
require ('lib/Debugger.php');
Debugger::start (conf ('General', 'debug'));
/**
* Include the core libraries used by the front controller
* to dispatch and respond to requests.
*/
require ('lib/DB.php');
require ('lib/Page.php');
require ('lib/I18n.php');
require ('lib/Controller.php');
require ('lib/Template.php');
require ('lib/View.php');
/**
* If we're on the command line, set the request to use
* the first argument passed to the script.
*/
if (defined ('STDIN')) {
$_SERVER['REQUEST_URI'] = '/' . $argv[1];
}
/**
* Initialize some core objects. These function as singletons
* because only one instance of them per request is desired
* (no duplicate execution for things like loading translation
* files).
*/
$i18n = new I18n ('lang', conf ('I18n'));
$page = new Page;
$controller = new Controller (conf ('Hooks'));
$tpl = new Template (conf ('General', 'charset'), $controller);
$controller->page ($page);
$controller->i18n ($i18n);
$controller->template ($tpl);
View::init ($tpl);
/**
* Check for a bootstrap.php file in the root of the site
* and if found, use it for additional app-level configurations
//.........这里部分代码省略.........
示例2: define
* Check ELEFANT_ENV environment variable to determine which
* configuration to load. Also include the Elefant version,
* autoloader, and core functions, and set the default
* timezone to avoid warnings in date functions.
*/
define('ELEFANT_ENV', getenv('ELEFANT_ENV') ? getenv('ELEFANT_ENV') : 'config');
require 'conf/version.php';
require 'lib/Autoloader.php';
require 'lib/Functions.php';
date_default_timezone_set(conf('General', 'timezone'));
/**
* Enable the debugger if conf[General][debug] is true.
*/
if (conf('General', 'debug')) {
require 'lib/Debugger.php';
Debugger::start();
}
/**
* Include the core libraries used by the front controller
* to dispatch and respond to requests.
*/
require 'lib/DB.php';
require 'lib/Page.php';
require 'lib/I18n.php';
require 'lib/Controller.php';
require 'lib/Template.php';
require 'lib/View.php';
/**
* If we're on the command line, set the request to use
* the first argument passed to the script.
*/