I'm a newbie expermenting with templates.
Here is the php file i'm having trouble with:
<?php
include "template.inc";
//eventually replace with dblookup
$tit = "Curlious Links";
$headline="Links-let's travel the world!";
$head_image="";
$main_content="<b>Template Test</b>";
$foot="Thankyou! Good bye!"
$t = new Template("./templates/");
// create a template object named $t
$t->set_file("Links","main.ihtml");
// set MyFileHandle links = our template file
// set template variables
$t->set_var("tit",$my_color);
$t->set_var("headline",$headline);
$t->set_var("head_image",$head_image);
$t->set_var("main_content",$main_content);
$t->set_var("foot",$foot);
// set template variable MyOutput = parsed file
$t->parse("MyOutput","MyFileHandle");
// output the value of MyOutput (our parsed data)
$t->p("MyOutput");
?>
I get the erroršarse error: parse error in /web/sites/176/curlious/www.curlious.f2s.com/links.php on line 9
which I believe is at the new Template line
I have a directory templates with main.ihtml file is the path setup wrong?
http://www.curlious.f2s.com