Update base.php

This commit is contained in:
Namhyeon Go 2018-01-01 02:55:03 +09:00 committed by GitHub
parent 3eea58a2c9
commit 98ff64f2d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,3 +29,19 @@ if(!function_exists("cut_str")) {
return $cutted_str;
}
}
if(!function_exists('read_file_by_line')) {
function read_file_by_line($filename) {
$lines = array();
$handle = fopen($filename, "r");
if ($handle) {
while (($line = fgets($handle)) !== false) {
$lines[] .= $line;
}
fclose($handle);
}
return $lines;
}
}