X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=dwt.php;fp=dwt.php;h=82629ffcf19be9bc1693766e3e69f34ba063b196;hb=410481c790e47f6a8193a2f3eb67e09180be0339;hp=6cd2d664b4568cc1821434238fe45d2c7c02bef1;hpb=23f790f927fdb73a36470b1617e08214bb4a75df;p=wfpl.git diff --git a/dwt.php b/dwt.php index 6cd2d66..82629ff 100644 --- a/dwt.php +++ b/dwt.php @@ -32,11 +32,15 @@ function dwt_init() { dwt_reset(); } -function dwt_load($filename) { - $GLOBALS['_dwt_template'] = read_whole_file($filename); +function dwt_load_str($str) { + $GLOBALS['_dwt_template'] = $str; dwt_init(); } +function dwt_load($filename) { + dwt_load_str(read_whole_file($filename)); +} + function dwt_set_raw($name, $value) { $GLOBALS['_dwt_keys'][] = $name; $GLOBALS['_dwt_values'][] = $value;