本文整理匯總了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();