0
zend和CI框架都有獨立的Model,View,Controller目錄。我的疑問是如何在Zend Framework中使用模型。Zend Framework和CodeIgniter模型類的疑惑
[笨控制器]
<?php
class Users extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('users_model');
}
function index()
{
// here i am using model function //
$myvar = $this->user_model->login();
}
}
?>
[Zend框架控制器]
<?php
class UsersController extends Zend_Controller_Action
{
public function indexAction()
{
// how to load model and use here ???? //
}
}
?>
在笨控制器I加載模式 「users_model」,並在指數函數中使用。以同樣的方式如何創建zend模型並在控制器中使用?請幫助我,對不起我的英語不好。
感謝網友, 拉金德拉
謝謝你,我會檢查這一項。 – Rajendra 2011-03-04 10:29:08