Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
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
+++ b/
basics.php
@@ -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;
+}
+
+?>