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

📄 clog.php

📁 用最近的dojo1.2.1制作前端的ajax购书网站
💻 PHP
字号:
<?php////	summary//		Creates/Opens files for logging data//		Useful for logging iinformation on a remote server//		when you don't have access to log files//		Also helpful for XHRs - since the page doesn't change//		to the PHP location which normally shows log data//		or errors.//// class cLOG {	var $logfile;	var $boolTimestamp;	function cLOG($filename, $boolTimestamp){		$this->boolTimestamp = $boolTimestamp;		$this->logfile = $filename;	}	function write($txt){		if($this->boolTimestamp){			$dt = date("y.m.d G.i.s");			$txt = "[". $dt ."]: ".$txt;		}		$fh = fopen($this->logfile, "a");		if(is_array($txt)){			//$txt = "::::::::".$txt;			$ar = $txt;			$txt = "Array:::::\n";			foreach($ar as $key => $value){				$txt += $key."=".$value."\n";			}		}		fwrite($fh, $txt."\n");		fclose($fh);	}	function clear(){		$fh = fopen($this->logfile, "w");		fwrite($fh, "");		fclose($fh);	}	function newline(){		$fh = fopen($this->logfile, "a");		fwrite($fh, "\n\n");		fclose($fh);	}}?>

⌨️ 快捷键说明

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