28 lines
573 B
PHP
Raw Permalink Normal View History

2023-01-24 19:00:39 +01:00
<?php
class common {
2023-01-24 19:00:39 +01:00
public static function except ($txt) {
// in any case, we log it!
$fp = fopen(ERROR_LOG, 'a'); //opens file in append mode
fwrite($fp, $txt ."\n");
fclose($fp);
if (DEBUG == 1) {
echo ($txt);
}
else {
echo ('There has been an error. Please try again later or contact ' .CONTACT);
}
}
public static function field2csv($txt) {
return str_replace (array ('"', "\n"), array ('', ''), $txt);
}
2023-01-24 19:00:39 +01:00
}
?>