JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
factored out read_whole_file into basics.php
[wfpl.git] / basics.php
diff --git a/basics.php b/basics.php
new file mode 100644 (file)
index 0000000..3a60248
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+function read_whole_file($name) {
+       $fd = fopen($name, 'r');
+       if($fd === false) {
+               die("Failed to read file: '$name'");
+       }
+       $temp = fread($fd, filesize($name));
+       fclose($fd);
+       return $temp;
+}
+
+?>