20-min-blog-tutorial - "Call to undefined function anchor() in" |
[eluser]muhax[/eluser]
[quote author="Shaun Andrews" date="1286997558"]Your constructor shouldnt be inside your index function. Try this: <?php class Blog extends Controller{ function index(){ $this->load->helper(‘url’); $this->load->helper(‘form’); $data[‘title’] = “My Blog Title”; $data[‘heading’] = “My Blog Heading”; $data[‘query’] = $this->db->get(‘entries’); $this->load->view(‘blog_view’, $data); } } ?> You may want to consider adding the url and form helpers to your autoloader: http://ellislab.com/codeigniter/user-gui...oader.html[/quote] Thank you guys, it works now. That video tutorial is misleading, they should review it. |
Messages In This Thread |
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 07:51 AM
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 08:02 AM
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 08:09 AM
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 08:17 AM
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 08:19 AM
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 08:27 AM
20-min-blog-tutorial - "Call to undefined function anchor() in" - by El Forum - 10-13-2010, 08:37 AM
|