diff options
author | admin <devnull@localhost> | 2006-10-02 04:58:03 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-02 04:58:03 +0200 |
commit | 78ce3cc370efc9d63b3d473deb37c92f40002d3d (patch) | |
tree | 23a9cc79a6a62ecc4a59d381a5b9741043f52341 /system/helpers | |
parent | c167f2cef36b88f0422032fbc14c40aa3bb8b163 (diff) |
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/file_helper.php | 7 |
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); |