PEAR question
I can't seem to use any of the PHP PEAR packages except DB. Everytime I try to include the necessary include file, it tells me it can't find it. It doesn't seem to have any trouble finding DB.php though. I'm really confused.
Obviously, this was cribbed from the PEAR website example. Can anyone tell me what I'm doing wrong? I keep getting this error:
Warning: main(HTML/Template/IT.php): failed to open stream: No such file or directory in /home/fiona/vrp/fitp/template_test.php on line 2
Fatal error: main(): Failed opening required 'HTML/Template/IT.php' (include_path='.:/usr/share/php:/usr/sha re/pear') in /home/fiona/vrp/fitp/template_test.php on line 2
Edit:
Haha, I'm a dork. I didn't realise that "pear rl" listed all the remote packages available, not the ones that are actually installed on the system. Turns out the package I wanted wasn't installed anyway.
Feh. Thanks for your help guys.
array("Stig", "Bakken"),
"1" => array("Martin", "Jansen"),
"2" => array("Alexander", "Merz")
);
$tpl = new HTML_Template_IT("./templates");
$tpl->loadTemplatefile("main.tpl.htm", true, true);
foreach($data as $name) {
foreach($name as $cell) {
// Assign data to the inner block
$tpl->setCurrentBlock("cell") ;
$tpl->setVariable("DATA", $cell) ;
$tpl->parseCurrentBlock("cell") ;
}
// Assign data and the inner block to the
// outer block
$tpl->setCurrentBlock("row") ;
$tpl->parseCurrentBlock("row") ;
}
// print the output
$tpl->show();
?>
Obviously, this was cribbed from the PEAR website example. Can anyone tell me what I'm doing wrong? I keep getting this error:
Warning: main(HTML/Template/IT.php): failed to open stream: No such file or directory in /home/fiona/vrp/fitp/template_test.php on line 2
Fatal error: main(): Failed opening required 'HTML/Template/IT.php' (include_path='.:/usr/share/php:/usr/sha
Edit:
Haha, I'm a dork. I didn't realise that "pear rl" listed all the remote packages available, not the ones that are actually installed on the system. Turns out the package I wanted wasn't installed anyway.
Feh. Thanks for your help guys.
