![]() |
I am a newbie in codeigniter. How to fix this error. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: I am a newbie in codeigniter. How to fix this error. (/showthread.php?tid=51716) |
I am a newbie in codeigniter. How to fix this error. - El Forum - 05-14-2012 [eluser]Unknown[/eluser] A PHP Error was encountered Severity: Notice Message: Undefined property: CI_Loader::$view Filename: controllers/blog.php Line Number: 7 My blog.php (controller is) <?php class Blog extends CI_Controller{ public function index() { $this->home(); } public function home(){ $this->load->view['homeview']; } } ?> homeview.php <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Welcome to CodeIgniter</title> <link rel="stylesheet" href="application/views/main.css" type="text/css"/> </head> <body> <div id="big_wrapper"> <h1>Suresh KUMAR Mukhiya</h1> </body> </html> I am a newbie in codeigniter. How to fix this error. - El Forum - 05-14-2012 [eluser]Chathuranga Tennakoon[/eluser] the problem occurs because you have used square brackets instead of parentheses. Code: problem : $this->load->view[‘homeview’]; // you have used square brackets I am a newbie in codeigniter. How to fix this error. - El Forum - 05-15-2012 [eluser]cideveloper[/eluser] Chathuranga is correct. also please use code blocks when posting code. Makes it a lot easier to read. Thanks I am a newbie in codeigniter. How to fix this error. - El Forum - 05-15-2012 [eluser]InsiteFX[/eluser] I had EllisLabs add the code tags to the top of New Topic, But they need to read... |