summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-08 21:15:09 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-08 21:15:09 +0000
commit5563a2c0043b2b90820f4155ab8553ef1390da6b (patch)
treef6957c6c0a0e251e6efcdc8223c80d3edd087e0a
parent4c24a0efe2146f7e7112f0e6c299cbc6e3fcbc1a (diff)
downloadpfsense-5563a2c0043b2b90820f4155ab8553ef1390da6b.zip
pfsense-5563a2c0043b2b90820f4155ab8553ef1390da6b.tar.gz
Add file_put_contents() function
-rw-r--r--etc/inc/pfsense-utils.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 0decd70..3c0bebb 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -139,6 +139,14 @@ function return_filename_as_array($filename, $strip = array('#')) {
return $file;
}
+if(!function_exists("file_put_contents")) {
+ function file_put_contents($filename, $data) {
+ $fd = fopen($filename,"w");
+ fwrite($fd, $data);
+ fclose($fd);
+ }
+}
+
/****f* pfsense-utils/get_carp_status
* NAME
* get_carp_status - Return whether CARP is enabled or disabled.
OpenPOWER on IntegriCloud