When phpzend_db uses Zend_Registry: set (db, & nbsp; $ db) for php & nbsp; zend_db, Zend_Registry: get (db) is not found, no set error reported & lt ;? Php $ db & nbsp; Zend_Db: factory ($ config-& gt; database-& gt; adapter, & php zend_db usage
When Zend_Registry: set ('DB', $ db) is used for php zend_db, Zend_Registry: get ('DB') fails, and the error "no set" is returned.
$ Db = Zend_Db: factory ($ config-> database-> adapter, $ config-> database-> config-> toArray ());
Zend_Registry: set ('DB', $ db );
// Zend_Db_Table: setDefaultAdapter ($ db );
Header ("Location: application/views/aa.htm ");
?>
In the initial stage of aa.html, you need to call a php.
$ This-> _ db = Zend_Registry: get ('DB'); an error is returned.
Is zend available only under the zf framework? is it not possible to directly reference zend without using the framework?
Thank you.
------ Solution --------------------
Is zend available only under the zf framework? is it not possible to directly reference zend without using the framework?
Yes, the principle is to re-use oop to define the zend function and method.