From 14031d152b76e7744d6f8a70964ecae77ca55179 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Mon, 5 May 2008 18:29:43 +0000 Subject: implemented fopen mode constants --- system/helpers/file_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/helpers') diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 1eb8348e9..2bcb98b4d 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -50,7 +50,7 @@ if (! function_exists('read_file')) return file_get_contents($file); } - if (! $fp = @fopen($file, 'rb')) + if (! $fp = @fopen($file, FOPEN_READ_BOF)) { return FALSE; } @@ -85,7 +85,7 @@ if (! function_exists('read_file')) */ if (! function_exists('write_file')) { - function write_file($path, $data, $mode = 'wb') + function write_file($path, $data, $mode = FOPEN_WRITE_CREATE_BOF) { if (! $fp = @fopen($path, $mode)) { @@ -167,7 +167,7 @@ if (! function_exists('get_filenames')) { function get_filenames($source_dir, $include_path = FALSE, $_recursion = FALSE) { - $_filedata = array(); + static $_filedata = array(); if ($fp = @opendir($source_dir)) { -- cgit v1.2.3-24-g4f1b