diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-05-05 20:29:43 +0200 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-05-05 20:29:43 +0200 |
commit | 14031d152b76e7744d6f8a70964ecae77ca55179 (patch) | |
tree | 2738a95460ee4efd5a70e5853f419e6a10d4539f /system/helpers | |
parent | 5f6b5442e5a3d7fa5cf6c047ed716b82946629a2 (diff) |
implemented fopen mode constants
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/file_helper.php | 6 |
1 files changed, 3 insertions, 3 deletions
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))
{
|