I want to use pear .I have installed the xampp package..The pear folder is already on C:\xampp\php\PEAR.I had written the following code.. <?php // Include the appropriate PEAR classes require_once("DB.php"); $dsn = array( 'phptype' => 'mysql', 'hostspec' => 'localhost', 'database' => 'emp', 'username' => 'root', 'password' => 'mysql' ); $dbh = DB::connect($dsn); $stmt = "SELECT id, name FROM examples ORDER BY id"; $result = $dbh->simpleQuery($stmt, DB_FETCHMODE_ASSOC); if ($dbh->numRows($result) > 0) { $data = (object) $dbh->fetchRow($result, DB_FETCHMODE_ASSOC); echo "id => $data->id<br>\n"; echo "name => $data->name<br>\n"; } ?> It shows an error message like Warning: require_once(DB.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\divya\Pear-examples\dbconnect.php on line 3 Fatal error: require_once() [function.require]: Failed opening required 'DB.php' (include_path='.;c\xampp\php\PEAR') in C:\xampp\htdocs\divya\Pear-examples\dbconnect.php on line 3 The Pear path is already included on php.ini file like include_path = ".;c\xampp\php\PEAR" ...What should I do?Plz help me?
Sorry ..By mistake .I used colon .But still same error..I also changed the read only permissions of Pear folder.
I think there is some problem in path specification. Have you checked all the folders?? all these paths are correct??