On 06/29/2010 12:20 PM, Louie Miranda wrote:
I am trying ZF as a loose class, but I am failing when connecting to a db.

I have added the ZF library on php.ini includes and created a file.

test01.php

<?php
require_once 'Zend/Db.php';
$db = new Zend_Db_Adapter_Pdo_Mysql(array(
'host'     => '192.168.1.33',
'username' => 'dba',
'password' => 'pass',
'dbname'   => 'database'
));

print_r($db);
?>

The error is, PHP Fatal error:  Class 'Zend_Db_Adapter_Pdo_Mysql' not found

I believe Zend/Db.php is trying to look for the adapater inside the
/test/test01.php directory? What should I do to correct this? and is
this proper?
--
Louie Miranda
- Email: [email protected] <mailto:[email protected]>
- Web: http://www.louiemiranda.com


require_once 'Zend/Db/Adapter/Pdo/Mysql.php';

--
Regards,
Nilesh Govindarajan
Facebook: http://www.facebook.com/nilesh.gr
Twitter: http://twitter.com/nileshgr
Website: http://www.itech7.com
Cheap and Reliable VPS Hosting: http://j.mp/arHk5e

Reply via email to