Helper file and token prep
This commit is contained in:
22
secret/helpers.php
Normal file
22
secret/helpers.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
function clearCookies() {
|
||||
if(count($_COOKIE) > 0) {
|
||||
foreach ($_COOKIE as $key => $value) {
|
||||
setcookie($key, "", time()-3600);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function flog($log_msg) {
|
||||
$log_filename = "/var/www/html";
|
||||
$log_file_data = $log_filename.'/log_' . date('d-M-Y') . '.log';
|
||||
file_put_contents($log_file_data, $log_msg . "\n", FILE_APPEND);
|
||||
}
|
||||
|
||||
function enableDebug(){
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user