From 7ab8bb716071bb6a12960e715b8be7d4baea6dc8 Mon Sep 17 00:00:00 2001 From: defacer Date: Fri, 25 Feb 2005 02:46:05 +0000 Subject: [PATCH] Adding workaround for PHP < 4.3.0 where file_get_contents does not exist. --- lib/filelib.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/filelib.php b/lib/filelib.php index fcb3f9fcf9a..a0141248465 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -96,4 +96,11 @@ function put_records_csv($file, $records, $table = NULL) { return true; } +if (!function_exists('file_get_contents')) { + function file_get_contents($file) { + $file = file($file); + return !$file ? false : implode('', $file); + } +} + ?>