summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/file_helper.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 32c0b2cdc..4c7eaa54e 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -42,6 +42,11 @@ function read_file($file)
{
return FALSE;
}
+
+ if (function_exists('file_get_contents'))
+ {
+ return file_get_contents($file);
+ }
if ( ! $fp = @fopen($file, 'rb'))
{
@@ -53,7 +58,7 @@ function read_file($file)
$data = '';
if (filesize($file) > 0)
{
- $data = fread($fp, filesize($file));
+ $data =& fread($fp, filesize($file));
}
flock($fp, LOCK_UN);