Call to a member function initialize() |
[eluser]Adnan1984[/eluser]
Hello, I saw a video tutorial "CodeIgniter from Scratch: Displaying & Sorting Tabular Data" (http://net.tutsplus.com/tutorials/php/co...ular-data/) It is really good working in CodeIgniter 1.7 version. And now i am using CodeIgniter 2.1 version or latest version. it is not working and i got error message. it says: A PHP Error was encountered Severity: Notice Message: Undefined property: Films::$pagination Filename: controllers/films.php Line Number: 30 Fatal error: Call to a member function initialize() on a non-object in C:\XAMPP\HTDOCS\Ci_test_2_1\application\controllers\films.php on line 30 In Controller: Code: <?php In model: Code: <?php Can you solve this problem? Thank you Best wishes, Adnan
[eluser]Abdul Malik Ikhsan[/eluser]
add function __construct to controller : Code: class Films extends CI_Controller
[eluser]Adnan1984[/eluser]
I tried to add function __construct to controller but not working and same error message. Any idea?
[eluser]Abdul Malik Ikhsan[/eluser]
i'm using CI 2.1.2, it works. maybe, upgrade your CI or check your php environment. what php version you use ?
[eluser]Adnan1984[/eluser]
Mine is CI 2.1.2 and i am using XAMPP (PHP Version 5.3.5). Did u try to run for my programming code which i sent the post?
[eluser]qcsites[/eluser]
Model Line "class Film_model extends CI_Controller" Should extend CI_Model "class Film_model extends CI_Model"
|
Welcome Guest, Not a member yet? Register Sign In |