Problems with FastTemplates...
| From: | Juan Luis Baptiste M. | Date: | Mon, 10 Jul 2000 14:55:39 +0000 |
| Subject: | Problems with FastTemplates... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5728@lists.php.net to get a copy of this message | ||
Hi!
I'm trying to use FastTemplates, but I'm having trouble when creating an
instance of FastTemplate. I have in
/usr/local/apache/htdocs/prueba/mytemplate.tpl (the html file),
fasttemplate.php (the class) and test.php (where I call new
fasttemplate, define, assign, etc...). When I do:
$tpl= new fastTemplate("/usr/local/apache/htdocs/prueba/");
I get this error:
ERROR: get_template() failure: [/usr/local/apache/htdocs/prueba/]
If I do
$tpl= new fastTemplate("prueba/");
I get this:
ERROR: Specified ROOT dir [prueba/] is not a directory
ERROR: Cannot open template. Root not valid.
and prueba it IS a directory. What I'm doing wrong?
And if I do this:
$tpl= new fastTemplate(".");
I get this:
ERROR: get_template() failure: [./]
Here is a snippet of the code: (it's very simple, I'm until trying to
learn how to use it)
<?
include ("fasttemplates.php");
$tpl= new fastTemplate("prueba/");
$tpl->define(array("start => mytemplate.tpl"));
$tpl->assign(array("TITLE => My titulo","CONTENT => Mi
contenido!!!!"));
$tpl->parse(start, array( "start"));
$tpl->FastPrint();
?>
Thanks for your help.