Jump to content

PEAR help....


JJohnsenDK

Recommended Posts

Hey

 

Im not sure how to link to pear.

 

I get this error:

 

Warning: main(DB.php): failed to open stream: No such file or directory in /usr/home/tallet4/public_html/test/db_connect.php on line 5

 

Fatal error: main(): Failed opening required 'DB.php' (include_path='.:') in /usr/home/tallet4/public_html/test/db_connect.php on line 5

 

And im using this code:

 

<?php

require_once 'DB.php';

$db_engine = 'mysql';
$db_user = 'user';
$db_pass = 'pass';
$db_host = 'localhost';
$db_name = 'name';

$datasource = $db_engine.'://'.
              $db_user.':'.
              $db_pass.'@'.
               $db_host.'/'.
                $db_name;

$db_object = DB::connect($datasource, TRUE);

if(DB::isError($db_object)) {
    die($db_object->getMessage());
}

$db_object->setFetchMode(DB_FETCHMODE_ASSOC);

include('check_login.php');

?>

 

Any help would be very apreciatet :)

Link to comment
https://forums.phpfreaks.com/topic/38155-pear-help/
Share on other sites

yup i know

 

but how do i tell that the file DB.php is in this folder:

 

webserver/php/pear/DB.php

 

When my htdocs is like this:

webserver/htdocs/

 

how should i link to DB.php in pear folder? I cant go futher back than htdocs can i?

 

I tried: set_include_path('../../php/pear/');

 

But its not working.

Link to comment
https://forums.phpfreaks.com/topic/38155-pear-help/#findComment-182658
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.