0.9.0 - the ZapV version updated to current php standards. Brave search used, while Bing and Google search api are deprecated
This commit is contained in:
parent
3d4298fe8b
commit
4ddaddda3d
31 changed files with 1778 additions and 1 deletions
28
utils/Log.class.php
Executable file
28
utils/Log.class.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
/**
|
||||
* Puts log information on images in two files
|
||||
*/
|
||||
class Log {
|
||||
private $folder;
|
||||
|
||||
private $logFileName;
|
||||
|
||||
private $logFileXmlName;
|
||||
|
||||
function __construct($imgFolder) {
|
||||
$this->folder = $imgFolder;
|
||||
|
||||
$this->logFileName = $imgFolder . DIRECTORY_SEPARATOR . 'log.txt';
|
||||
$this->logFileXmlName = $imgFolder . DIRECTORY_SEPARATOR . 'log.xml';
|
||||
}
|
||||
|
||||
public function addToLog($type, $head, $addString) {
|
||||
$addToLog = "$head $addString" . PHP_EOL;
|
||||
$addToXmlLog = "<div class=\"$type\">" . PHP_EOL . "\t<strong>$head</strong>" . PHP_EOL;
|
||||
$addToXmlLog .= "\t<p>$addString</p>" . PHP_EOL . "</div>" . PHP_EOL;
|
||||
|
||||
$txtOk = @file_put_contents($this->logFileName, $addToLog, FILE_APPEND);
|
||||
$xmlOk = @file_put_contents($this->logFileXmlName, $addToXmlLog, FILE_APPEND);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue