Adding cache folder if nto exist
This commit is contained in:
1 parent
ef5d967aa5
commit
c19829233a
1 file changed
+2
-1
@@ -49,7 +49,8 @@ if(!$cache)
|
||||
$cache = md5(time().rand(1,2000));
|
||||
$hash = $cache.'-'.preg_replace("/[^A-Za-z0-9 ]/", '', $url).'.'.$ft;
|
||||
|
||||
|
||||
if(!is_dir(__DIR__.'/cache/'))
|
||||
mkdir(__DIR__.'/cache/');
|
||||
$file = __DIR__.'/cache/'.$hash;
|
||||
if(!file_exists($file))
|
||||
shell_exec('timeout '.$timeout.' /usr/sbin/wkhtmltoimage '.escapeshellcmd($vp.$jsp.'-f '.$ft.' '.$url.' '.$file));
|
||||
|
||||
Reference in new issue
Block a user