Welcome Guest, Not a member yet? Register   Sign In
Problem with function Blog() in first tutorial.
#2

[eluser]NotDior[/eluser]
Would it be possible to post your code. it sounds like it's a rather easy fix. This is probably what the start of your controller class needs to look like:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Blog extends CI_Controller {

function __construct() {
  parent::__construct();
  $this->load->model("Blogmodel");
}

public function index()
{
  $xProducts = $this->Blogmodel->getPosts();
        }

Realize that tutorial is really old (assuming it's the video) and a lot of things have changed.


Messages In This Thread
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 05:17 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 06:47 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 07:10 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 07:57 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 08:09 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 08:11 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 08:25 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 08:27 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 08:42 AM
Problem with function Blog() in first tutorial. - by El Forum - 10-02-2012, 08:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB