mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 18:59:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1407 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1ea801bf67
commit
c459b1bf0d
11 changed files with 351 additions and 29 deletions
|
|
@ -14,11 +14,21 @@
|
|||
**/
|
||||
function readFile($file_name) {
|
||||
if(!file_exists($file_name)) return;
|
||||
if(filesize($file_name)<1) return;
|
||||
|
||||
$filesize = filesize($file_name);
|
||||
|
||||
if($filesize<1) return;
|
||||
|
||||
$fp = fopen($file_name, "r");
|
||||
$buff = fread($fp, filesize($file_name));
|
||||
fclose($fp);
|
||||
return trim($buff);
|
||||
$buff = '';
|
||||
if($fp) {
|
||||
while(!feof($fp) || strlen($buff)<$filesize) {
|
||||
$str = fgets($fp, 1024);
|
||||
$buff .= $str;
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
return $buff;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue