summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-07-25 21:00:21 +0200
committerAndreas Gohr <andi@splitbrain.org>2007-07-25 21:00:21 +0200
commit43078d10727954e0bdd01453555c690206289637 (patch)
treeb65d16e0a0b0146d79f1031b5bd50c1cedc5f1ce
parentd734b1236026ba575bea36679389ec0b10b33244 (diff)
downloadrpg-43078d10727954e0bdd01453555c690206289637.tar.gz
rpg-43078d10727954e0bdd01453555c690206289637.tar.bz2
use file_get_contents to read files
darcs-hash:20070725190021-7ad00-32ea2f7d76d6508dfeb9dfd90f94132c4020386c.gz
-rw-r--r--inc/io.php4
-rw-r--r--install.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/io.php b/inc/io.php
index d941ef05f..e097dce69 100644
--- a/inc/io.php
+++ b/inc/io.php
@@ -94,7 +94,7 @@ function io_readFile($file,$clean=true){
}else if(substr($file,-4) == '.bz2'){
$ret = bzfile($file);
}else{
- $ret = join('',file($file));
+ $ret = file_get_contents($file);
}
}
if($clean){
@@ -112,7 +112,7 @@ function bzfile($file){
$bz = bzopen($file,"r");
while (!feof($bz)){
//8192 seems to be the maximum buffersize?
- $str = $str . bzread($bz,8192);
+ $str = $str . bzread($bz,8192);
}
bzclose($bz);
return $str;
diff --git a/install.php b/install.php
index 5e209c4b5..743ae93c4 100644
--- a/install.php
+++ b/install.php
@@ -429,7 +429,7 @@ function check_functions(){
'glob header ignore_user_abort ini_get mail mkdir '.
'ob_start opendir parse_ini_file readfile realpath '.
'rename rmdir serialize session_start unlink usleep '.
- 'preg_replace');
+ 'preg_replace','file_get_contents');
if (!function_exists('mb_substr')) {
$funcs[] = 'utf8_encode';