Skip to content

Commit e0b7c8c

Browse files
committed
Updated performance.php to create the cache directory if it doesn't exist.
1 parent c8759d2 commit e0b7c8c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/performance.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ function fetch($url) {
2020
]);
2121
$html = file_get_contents($url, false, $context);
2222
if ($url != $cache) {
23+
$dir = dirname($cache);
24+
if (!is_dir($dir)) {
25+
mkdir($dir, 0755, true);
26+
}
2327
file_put_contents($cache, $html);
2428
}
2529
return $html ? $html : false;

0 commit comments

Comments
 (0)