Bước 1 : Tải file đính kèm, giải nén nó vào
/system/helper/ directory
Bước 2 : Mở file index.php (ở thư mục gốc nhá), thêm vào đoạn code sau ở đầu file
define('DEBUG', true); // comment to disable debug mode
define('SQL_DEBUG', true); // comment to disable sql-debugging
if(defined('DEBUG')) {
$start_time = microtime();
$start_mem = memory_get_usage();
}
Bước 3 : Vẫn ở file index.php này, sau dòng
// Configuration
require_once('config.php');
thêm vào
if(defined('SQL_DEBUG'))
require_once(DIR_SYSTEM . 'helper/debug.php');
Bước 4 : Vẫn ở file index.php này, sau dòng
// Output
$response->output();
Thêm vào đoạn code
if(defined('DEBUG')) {
$end_time = (microtime() - $start_time);
$end_mem = (memory_get_usage() - $start_mem);
echo '<style>#debug tr:hover {background:#FFC}</style><table id="debug" border="1" width="100%">';
echo '<tr><td colspan="3">Memory Usage: '.round((($end_mem / 1024) / 1024), 6).' MB</td></tr>';
echo '<tr><td colspan="3">Execution Time: '.abs(round($end_time, 6)).' seconds</td></tr>';
if(defined('SQL_DEBUG'))
Debug::output();
echo '</table>';
}
Bước 5 : Mở file /system/library/db.php
Sau dòng
public function query($sql) {
Thêm vào :
if(defined('SQL_DEBUG')) { $caller = debug_backtrace(); Debug::trigger('sql', $sql, $caller); }
OK, giờ hãy chạy và cảm nhận nhé Big Grin . Lưu ý nếu bạn muốn tắt nó đi, chỉ cần comment 2 dòng
define('DEBUG', true); // comment to disable debug mode
define('SQL_DEBUG', true); // comment to disable sql-debugging
Minimal opencart:xem phim online truc tuyen!phim online chat luong cao nhanh!xem phim online truc tuyen!
Opencart without cart function: xem phim tam ly han quoc!xem phim tam ly manh
Bro quên đính kèm file rồi
Minimal opencart 1.6.4: sửa máy giặt, Tổng kho sàn nhựa tại Hà Nội, phụ kiện xe Mercedes, xe du lịch, ghế gang
Who is online
Users browsing this forum: No registered users and 53 guests