Cita:   
Ahora en el fichero que voy a usar PEAR pngo el siguiente código:\cpadmin
\includes
\ajax
\editor
\pear
\DB
\smarty
dBug.php
DB.php
PEAR.php
\themes
boletin.php
config.inc.php
gallery.php
guestbook.php
index.php
infophp.php
information.php
modules.php
news.php
phrases.php
polls.php
search.php
stats.php
users_list.php
your_account.php
 \includes
\ajax
\editor
\pear
\DB
\smarty
dBug.php
DB.php
PEAR.php
\themes
boletin.php
config.inc.php
gallery.php
guestbook.php
index.php
infophp.php
information.php
modules.php
news.php
phrases.php
polls.php
search.php
stats.php
users_list.php
your_account.php
Código PHP:
   <?
 setlocale(LC_ALL, 'esp_ESP');
 include_once('config.inc.php');
 require_once('includes/smarty/Smarty.class.php');
 require_once('includes/pear/PEAR.php');
 require_once('includes/pear/DB.php');
 
 $tpl = new Smarty;
 $tpl->template_dir     = $template_dir_portal;
 $tpl->compile_dir     = $template_dir_portal . 'theme_c/';
 $tpl->config_dir     = $template_dir_portal . 'theme_config/';
 $tpl->cache_dir     = $template_dir_portal . 'theme_cache/';
 $tpl->compile_check = true;
 
 $dsn = array(
     'phptype'  => 'mysqli',
     'username' => 'xxx',
     'password' => 'xxx',
     'hostspec' => 'localhost',
     'database' => 'xxx',
 );
 
 $db =& DB::connect($dsn);
 if (PEAR::isError($db)) {
     die($db->getMessage());
 }
 
 $tpl->display("home.tpl");
 $tpl->clear_all_assign();
 $db->disconnect();
?>    Esperando por sus respuestas
Salu2
 
 

 Problemas con PEAR
 Problemas con PEAR 

