mirror of
https://github.com/mosbth/cimage.git
synced 2025-01-17 19:18:15 +01:00
make debug depend on file exists
This commit is contained in:
parent
6118f298ff
commit
9a0a9429db
@ -18,6 +18,9 @@ define("CIMAGE_USER_AGENT", "CImage/$version");
|
||||
function debug($msg)
|
||||
{
|
||||
$file = "/tmp/cimage";
|
||||
if (!is_writable($file)) {
|
||||
return;
|
||||
}
|
||||
$msg .= ":" . count(get_included_files());
|
||||
$msg .= ":" . round(memory_get_peak_usage()/1024/1024, 3) . "MB";
|
||||
$msg .= ":" . (string) round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']), 6) . "ms";
|
||||
|
Loading…
x
Reference in New Issue
Block a user