FastTemplate Error (Undefined Property / Undefined Constant)
| From: | Wandrer | Date: | Sun, 10 Dec 2000 21:12:37 +0000 |
| Subject: | FastTemplate Error (Undefined Property / Undefined Constant) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-29586@lists.php.net to get a copy of this message | ||
Running test.php as listed below yields an error "Warning: Undefined property: ESTABLISHED_ACCOUNT_LIST in class.FastTemplate.php3 on line 240".
Line #240 in FastTemplate.php3 is:
$this->$ReturnVar .= $this->parse_template($this->$val,$this->PARSEVARS);
My questions is how can this be fixed in either FastTemplate.php3 or in test.php (as seen below) ? The docs on FastTemplate say that line 10 in test.php should be in the form of:
$tpl->parse(MAIN, ".main");
but that yields the following error:
"Warning: Use of undefined constant ESTABLISHED_ACCOUNT_LIST - assumed 'ESTABLISHED_ACCOUNT_LIST' in /usr/local/etc/httpd/test.php on line 14"
Can anyone else help me out with this problem ?
===== test.php =====
<script language="php">
error_reporting(1023);
include("class.FastTemplate.php3");
$displaytemplate = new FastTemplate(".");
$displaytemplate->strict();
$displaytemplate->define(array(
"EstablishedView" => "AdminView.tpl",
"EstablishedList" => "AdminList.tpl"
));
$displaytemplate->parse("ESTABLISHED_ACCOUNT_LIST" , ".EstablishedList");
$displaytemplate->parse("ESTABLISHED_ACCOUNT_LIST" , ".EstablishedList");
$displaytemplate->parse("ESTABLISHED_ACCOUNT_LIST" , ".EstablishedList");
$displaytemplate->parse("ESTABLISHED_ACCOUNT_LIST" , ".EstablishedList");
$displaytemplate->parse("ESTABLISHED_ACCOUNT_LIST" , ".EstablishedList");
$displaytemplate->parse ("GLOBAL" , "EstablishedView");
$displaytemplate->FastPrint();
exit;
</script>
===== test.php =====
===== AdminList.tpl =====
<html>
<hr>
Another Line<br>
</html>
===== AdminList.tpl =====
===== AdminView.tpl =====
<test>
{ESTABLISHED_ACCOUNT_LIST}<br>
</test>
===== AdminView.tpl =====