<?php
if(!defined('ABSPATH')){
die('HACKING ATTEMPT');
}
function speedycache_issue_listner(){
speedycache_log(error_get_last());
}
setcookie("test_speedycache", "John Doe", time() + 3600, "/");
setcookie("test_spee", "John Doe", time() + 3600, "/");
register_shutdown_function('speedycache_issue_listner');
function speedycache_log($error){
if(empty($error)){
return;
}
if(!is_scalar($error)){
$error = serialize($error);
}
$error = '[' . date('j,M Y, g:i a T') . '] ' . $error . ' ' . "\n";
file_put_contents(WP_CONTENT_DIR . '/speedycache.log', $error, FILE_APPEND);
}