No output when HTML_Template_IT is called
| From: | vmast5 at comcast dot net | Date: | Tue, 15 Mar 2005 00:03:56 +0000 |
| Subject: | No output when HTML_Template_IT is called | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18045@lists.php.net to get a copy of this message | ||
Hello
I was wondering if anyone could give me some insight as to why nothing outputs when I run a template
file. I am trying to use the
HTML_Template_IT 1.1 package and all I get is a blank page. I installed this package using the
following command: C:\Apache2\modules\php\pear install HTML_Template_IT . I am not sure if this is
the right way to install this package on WinLAMP. In any event, the package was installed in the
above directory which is where all the other packages that come with php are installed. I even tried
copying and pasting the folder HTML/Templates/IT into my document root thinking that this may be the
problem but that didn't work either. Do I have to do something in addition to the above? I am
using php 5.0.0, Apache 2.0.50 and MySQL 4.0.20. Everything else seems to be working fine except the
HTML_Template_IT package.
After installing the package, I created an instance of it by typing :
require_ once "HTML/Template/ITX.php";
$tpl = new HTML_Template_ITX("./templates");
$tpl->loadTemplatefile("example8-3.tpl.html", true, true);
$tpl->setCurrentBlock("row");
$tpl->setVariable("LASTNAME", $lastname);
$tpl->setVariable("FIRSTNAME", $firstname);
$tpl->setVariable("PHONE", $phone);
$tpl->parseCurrentBlock("row");
$tpl->show();
The query (not shown) is suppose to insert a new row into my phonebook table (which it does) and
then a template (example8-3.tpl.html) that shows the results is supposed to be loaded and displayed
but this doesn't happen, all I see is a blank page. I have tried everything, what am I doing
wrong?
Thanks in advance
Valerie