本文整理汇总了PHP中debug::start方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::start方法的具体用法?PHP debug::start怎么用?PHP debug::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug
的用法示例。
在下文中一共展示了debug::start方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* 运行项目
*/
public static function run()
{
self::init();
//初始化运行环境
self::formatRequest();
//如果开启自动转义,去除转义
self::setAppGroupPath();
//设置应用路径
self::loadAppGroupConfig();
//载入应用组配置
self::setAppPath();
//设置PATH_APP
self::loadAppConfig();
//加载应用配置文件
self::loadUserFile();
//加载系统类文件数据
self::setPathConst();
//设置缓存目录常量
self::createDemoControl();
//创建应用目录
self::setTplConst();
//设置模板常量
self::language();
//加载语言包
self::ajaxCloseDebug();
//ajax时关闭调试
self::setCharset();
//设置字符集
self::createDir();
//创建项目缓存目录结构
self::session_set();
self::compileAppGroupFile();
//项目核心文件编译缓存
self::compileAppFile();
//模块核心文件编译缓存
debug::start("app_start");
//调试开启,需要打开配置文件调试开关
self::apprun();
//项目开始
debug::show("app_start", "app_end");
//显示调试结果
log::save();
//记录日志
}
示例2: count
/**
* 连贯操作执行的find查询操作
* @param string $field
*/
public function count()
{
$this->initSql();
$sql = "SELECT count(*) as count FROM {$this->pre}{$this->table} {$this->sql['where']} {$this->sql['group']} {$this->sql['having']} {$this->sql['order']} {$this->sql['limit']}";
$this->check_query($sql);
debug::start();
$re = $this->_execute('fetch_first', $sql);
debug::end();
debug::add("{$sql} [" . debug::spent() . "]", 1);
if (!empty($re)) {
return $re['count'];
}
return $re;
}
示例3: timer
/**
* Add a timer entry. Query timer entries are not processed if self::$timeQueries is false
* @param String $title title of the entry
* @param Boolean $query[optional] process (or not) $query entries - default: false
* @return void
*/
public static function timer($title, $query = false)
{
if ($query && !self::$timeQueries) {
return;
}
$time = explode(" ", microtime());
$time = $time[1] + $time[0];
if (self::$start == 0) {
self::$start = $time;
}
if (PAGE_LOADER) {
self::$timer[] = array('title' => $title, 'time' => $time - self::$start);
}
}
示例4:
<?php
include "config.php";
include SYS_ROOT . "utils/global.php";
/*
if ($_SERVER['REQUEST_URI'] == '/feeds/main/' || $_SERVER['REQUEST_URI'] == '/feeds/main')
{
headers::url('/feed/articles/');
exit;
}
*/
debug::start();
router::start();
debug::stop();