--- /dev/null
+<?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;
+}
+
+?>
# including the use of sub-templates can be found in tem_test.php
require_once('code/wfpl/encode.php');
+require_once('code/wfpl/basics.php');
class tem {
var $keyval; # an array containing key/value pairs
-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;
-}
-
# this is used in template_run() and should be of no other use
function template_filler($matches) {
list($tag, $enc) = explode('.', $matches[1], 2);