Hi all, I’m newbie into Codeigniter and I find is an excellent piece of software, I was pretty excited about using it, but now I am a little bit dissapointed.
This is my first php framework, trying to accomplish the video tutorial “blog in 20 minutes” and I am stuck… again, first I noticed that the video tutorial doesn’t speak about creating a model for the controller is necessary, so when talks about putting…
$data[‘query’] = $this->db->get(‘entries’);
into the blog controller it didn’t worked for me… after hours of searching I realize that I had to create a blog_model and create an
function get_entries()
{
$query = $this->db->get(‘entries’);
return $query->result();
}
and replacing
$data[‘query’] = $this->db->get(‘entries’);
for
$data[‘query’] = $this->blog_model->get_entries();
Well… It took more or less four hours of headache
But now I am stuck in the function comments(), I get a 404 page, the url helper gives me the right link
http://localhost/codeigniter_test/index.php/blog/comments/1
I have tried to change the
$config[‘uri_protocol’] = “AUTO”;
to every parameter and doesn’t work, I have tried to change
$config[‘base_url’] = “http://localhost/codeigniter_test”;
with slash at the end and without… nothing
I have tried to create a comment model and nothing.
this is my comments function in the blog controller
function comments()
{
$data[‘titlepag’] = ‘My Comment Title’;
$data[‘headingpag’] = ‘My Comment Heading’;
//echo $this->comment_model->test();
$this->load->view(‘comment_view’, $data);
}
It wouldn’t be better to have an html updated tutorial than a video outdated tutorial? If somebody can help me I would really appreciate it. I am using XAMPP and Aptana IDE in an Apple environment. Thanks
