PEAR question

    Date: 03/29/05 (PHP Community)    Keywords: php, html, web

    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.


     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/share/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.

    Source: http://www.livejournal.com/community/php/278925.html

« quick question || Security »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home