Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add sql elapsed time

  • Loading branch information...
commit 60313ec4472cf8b0f359954a88bf5dfd0cb16010 1 parent 9b77c90
@ronalfei authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/core/dbdebug.class.php
View
6 lib/core/dbdebug.class.php
@@ -17,8 +17,8 @@ public function setQuery($host,$port,$database,$time,$sql)
if(_SQL_DEBUG=='Y'){
if(file_exists ( _SQL_PATH)){
$filename = _SQL_PATH.'sql.'.date('Ymd').'.log';
- $time = date('H:i:s');
- $data = "[{$time}] ".trim($sql)."; \r\n";
+ $now = date('H:i:s');
+ $data = "[{$now}] ".trim($sql)."; [{$time}]\r\n";
//判断是否可写
if( file_exists($filename) && !is_writable($filename) ){//文件存在且不可写
file_put_contents($filename.'.tmp',$data,FILE_APPEND);
@@ -37,4 +37,4 @@ public function getQueries()
}
}
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.