Skip to content

Commit

Permalink
增加 IS_OPEN_PROFILER 常量
Browse files Browse the repository at this point in the history
  • Loading branch information
breath-co2 committed Sep 6, 2013
1 parent 7cb471c commit 67547c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ public static function setup($auto_execute = true)
/**
* 是否开启DEBUG模式
*
* 开启远程debug方式:访问 `/opendebugger` 页面,会看到有要输入调试开启账号和密码,这个配置在 `config.php` 的 `$config['debug_open_password']` 中
*
* if (IS_DEBUG>>1)
* {
* //开启了在线调试
Expand All @@ -501,6 +503,24 @@ public static function setup($auto_execute = true)
*/
define('IS_DEBUG', $open_debug);

if ($open_debug && isset($_REQUEST['debug']))
{
$open_profiler = true;
}
else
{
$open_profiler = false;
}

/**
* 是否开启分析器
*
* 只有 DEBUG 打开时,IS_OPEN_PROFILER 才有可能被打开,打开方法:当打开 DEBUG 后,在地址栏GET参数中加入 `debug=yes` 访问
*
* @var boolean
*/
define('IS_OPEN_PROFILER', $open_profiler);


# Runtime配置
if (!isset(self::$core_config['runtime_config']))
Expand Down

0 comments on commit 67547c4

Please sign in to comment.