⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logger.php

📁 每个RFC 3261信息头有一个相应的存取标识. 但是,许多信息头拥有同样的形式。 例如。To和From的信息头都是由显示名和一个URI组成。 To和From信息头用来管理与处理NameAddr实例的
💻 PHP
字号:
<?php/*  $Id: logger.php,v 1.3 2003/06/20 16:23:08 hpdl Exp $  osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  Copyright (c) 2003 osCommerce  Released under the GNU General Public License*/  class logger {    var $timer_start, $timer_stop, $timer_total;// class constructor    function logger() {      $this->timer_start();    }    function timer_start() {      if (defined("PAGE_PARSE_START_TIME")) {        $this->timer_start = PAGE_PARSE_START_TIME;      } else {        $this->timer_start = microtime();      }    }    function timer_stop($display = 'false') {      $this->timer_stop = microtime();      $time_start = explode(' ', $this->timer_start);      $time_end = explode(' ', $this->timer_stop);      $this->timer_total = number_format(($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0])), 3);      $this->write(getenv('REQUEST_URI'), $this->timer_total . 's');      if ($display == 'true') {        return $this->timer_display();      }    }    function timer_display() {      return '<span class="smallText">Parse Time: ' . $this->timer_total . 's</span>';    }    function write($message, $type) {      error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' [' . $type . '] ' . $message . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);    }  }?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -