diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-17 19:31:09 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-17 19:31:09 +0000 |
commit | 023c3cc0e4ff5f8fe19120dbc80de4ad1b03ed21 (patch) | |
tree | 5648dcce976f69c6892dc78fec08564c8870c9b3 | |
parent | 622fa35a4f75736112a1f32b342600f185b80211 (diff) | |
download | pfsense-023c3cc0e4ff5f8fe19120dbc80de4ad1b03ed21.zip pfsense-023c3cc0e4ff5f8fe19120dbc80de4ad1b03ed21.tar.gz |
Add return_dir_as_array($filenaem): returns $filename contents as a string
-rw-r--r-- | etc/inc/pfsense-utils.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 4657adc..73ecc3b 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -54,4 +54,17 @@ function return_dir_as_array($dir) { return $dir_array; } +/* + * return_dir_as_array($filenaem): returns $filename contents as a string + */ +function return_filename_as_string($filename) { + $tmp = ""; + $fd = popen($filename, "r"); + while(!feof($fd)) { + $tmp .= fread($fd,49); + } + fclose($fd); + return $tmp; +} + ?>
\ No newline at end of file |