Hi.

I use the DB package of PEAR like this file :
Code:
//dbconn.php
<?php
    require_once('DB.php');
    $user = 'root';
    $pass = 'root';
    $host = 'localhost';
    $db_name = 'akb_cms';
    
    $dsn = "mysql://$user:$pass@$host/$db_name";
    $db = DB::connect($dsn);
?>
and I include like this :
Code:
    require_once('DB/dbconn.php');
    $res = $db->query ("SELECT * FROM table");
But I see this error :

Code:
Fatal error: Call to a member function query() on a non-object in C:\Inetpub\wwwroot\config.php on line 18
when I replace require_once with require my code work good !!!!!!!