summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 7a35b02da..df9ef0778 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -555,7 +555,7 @@ class CI_Output {
$cache_path .= md5($uri);
- if ( ! $fp = @fopen($cache_path, FOPEN_WRITE_CREATE_DESTRUCTIVE))
+ if ( ! $fp = @fopen($cache_path, 'w+b'))
{
log_message('error', 'Unable to write cache file: '.$cache_path);
return;
@@ -606,7 +606,7 @@ class CI_Output {
if (is_int($result))
{
- @chmod($cache_path, FILE_WRITE_MODE);
+ @chmod($cache_path, 0666);
log_message('debug', 'Cache file written: '.$cache_path);
// Send HTTP cache-control headers to browser to match file cache settings.
@@ -639,7 +639,7 @@ class CI_Output {
$uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string;
$filepath = $cache_path.md5($uri);
- if ( ! file_exists($filepath) OR ! $fp = @fopen($filepath, FOPEN_READ))
+ if ( ! file_exists($filepath) OR ! $fp = @fopen($filepath, 'rb'))
{
return FALSE;
}