log.inc

来自「用来优化php载入速度」· INC 代码 · 共 33 行

INC
33
字号
<?php	/**	* @author Michael Spector <michael@zend.com>	* @copyright Zend Technologies Ltd 2005	* @version $Revision: 1.4.4.2 $	* @since $Date: 2005/08/24 12:27:56 $	*/	/**	* class Log	* 	* This class used for logging entries	* LOG_FILE constant should be set to the log filename, otherwise system logging	* instruments will be used.	*/	class Log	{		/**		* This function appends entry to the logfile if it was set, otherwise - to the system log		* @param string entry		*/		function append ($entry)		{			if(defined ('LOG_FILE')) {				@error_log (sprintf("%s %s\n", date('[M d H:i:s]'), $entry), 3, LOG_FILE);			} else {				@error_log (sprintf("%s %s\n", date('[M d H:i:s]'), $entry));			}		}	}?>

⌨️ 快捷键说明

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