|
我想在view里面调用model里面的方法。
$this->load->model('Cat');
$cats = $this->Cat->getAll(false);
echo form_multiselect('catid', $cats);
结果说:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: CI_Loader:Cat
Filename: views/prodadd.php
Line Number: 29
Fatal error: Call to a member function getAll() on a non-object in D:\Apmxe-Pass\htdocs\application\views\prodadd.php on line 29 |
|