Added check for whether cache folder exists. If it does not, it is created and then written to

This commit is contained in:
ossreleasefeed 2010-10-27 04:53:57 +08:00 committed by Scott Jehl
parent a0815daf48
commit bb59c278c3

View file

@ -163,6 +163,11 @@
// Store cache
if ($cache) {
if(!file_exists($cachedir)) {
mkdir($cachedir, 0700);
}
if ($fp = fopen($cachedir . '/' . $cachefile, 'wb')) {
fwrite($fp, $contents);
fclose($fp);