php
[php] write log function
동동(이재동)
2009. 3. 4. 10:52
//writelog function
function WriteLog($LogContents)
{
$date = date("Ymd");
$time = date("H:i:s");
if (chdir("./Log"))
{
chdir("../");
}
else
{
mkdir("./Log");
}
$fp = fopen("./Log/$date.log", "a");
fwrite($fp, $time."\t$LogContents\r\n");
fclose($fp);
}