Re: [Phplib-users] Template woes
Brought to you by:
nhruby,
richardarcher
From: Nathaniel P. <np...@te...> - 2004-09-16 00:09:19
|
Shiloh Madsen wrote: > Ok, im going slightly mad here. Im about as green as you can be with > linux (running fedora 2 if it matters) and i spent the majority of the > day trying to install phplib. I thought it was working as i tried that > snippit of code: > > <?php > $db = new DB_Example; > print "It works without error messages.<br>\n"; > ?> > > and it returned the line that it was supposed to. > > Now ive been working with wileys Secure php development and it makes > heavy use of templates. I cannot for the life of me figure out what im > doing wrong here. As far as i can tell the template functionality > seems to not be working. I went back to basics and input the phplib > code snippet for templates: > > <?php > $t = new Template; > > $t->set_var("a", "defined as hugo"); > $t->set_var("b", "the value of a is {a}"); > > print $t->subst("b") > ?> > > but this bit of code simply brought up a blank screen for me. Given > that the db code worked without having to specify any certain include > i would think that should mean I should have full access to the phplib > functionality. Is there some further configuration that I have to do > to get all this up and running? Most likely. The PHPlib Template library is not part of the core PHPlib functionality, so it must be included. If you use it extensively, you'll want to put a line like this in your prepend.php file: require($_PHPLIB["libdir"] . "template.inc"); If you don't use it so often, you can also include template.inc manually on the pages that require it. Hope that helps. Incedentally, I'd think you'd get errors on the second test... What error reporting level do you have PHP configured at? -- ___________________________ Nathaniel Price http://www.tesserportal.net Webmaster |