<?php
/**
* The class is use to maintain the logs in the log file
* @author Naveen Valecha<valecha29@gmail.com>
*/
class Log {
protected $file = 'log.txt';
public function write($data) {
$file = fopen($this->file, 'a+');
fputs($file, "\r\n");
fputs($file, $data);
fclose($file);
}
}
|