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.