diff options
-rw-r--r-- | it.class | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -697,6 +697,8 @@ function file_get($filename, $p = array()) $result[$arr[0]] = $arr[1]; } } + else if ($p['lines']) + $result = explode("\n", rtrim($data, "\n")); else $result = $data; @@ -713,6 +715,8 @@ function file_put($filename, $data, $p = array()) { if ($p['keyval']) $data = join("", it::map('"$k\t$v\n"', $data)); + else if ($p['lines']) + $data = join("", it::map('"$v\n"', $data)); return file_put_contents($filename == "-" ? "php://stdout" : $filename, $data); } |