diff options
author | Urban Müller | 2008-12-15 04:44:41 +0000 |
---|---|---|
committer | Urban Müller | 2008-12-15 04:44:41 +0000 |
commit | a1045c9a5d80adaa5a8ad58e9c630c7e6a3e1a62 (patch) | |
tree | 5d779a044144cfe5fda850fb8488d0f5b84b5bca /it.class | |
parent | 8305ec40a946ec4001af9b0721c2d960387dd81e (diff) | |
download | itools-a1045c9a5d80adaa5a8ad58e9c630c7e6a3e1a62.tar.gz itools-a1045c9a5d80adaa5a8ad58e9c630c7e6a3e1a62.tar.bz2 itools-a1045c9a5d80adaa5a8ad58e9c630c7e6a3e1a62.zip |
lines mode
Diffstat (limited to 'it.class')
-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); } |