From 78ce3cc370efc9d63b3d473deb37c92f40002d3d Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 2 Oct 2006 02:58:03 +0000 Subject: --- system/helpers/file_helper.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'system/helpers') 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); -- cgit v1.2.3-24-g4f1b