Hi all ,
I've just created a library called Cms and i've follow those steps : http://www.codeigniter.com/user_guide/ge...aries.html
When i try to access function in my library i obtain error : PHP FATAL ERROR : Call to a member function getTags() on a non-object
The controller code is :
My class is :
I've checked many times mispelled word, but everything seems to be ok !!
I'm lost !
Thank for your help !
I've just created a library called Cms and i've follow those steps : http://www.codeigniter.com/user_guide/ge...aries.html
When i try to access function in my library i obtain error : PHP FATAL ERROR : Call to a member function getTags() on a non-object
The controller code is :
PHP Code:
$this->load->library('Cms');
$pageName = "index";
$data['cms'] = $this->Cms->getTags($pageName);
$this->load->view('accueil', $data);
My class is :
PHP Code:
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Cms {
public function getTags($pageName)
{
$query = $this->db->query("SELECT * FROM cms WHERE 'page_name' = $pageName");
foreach ($query->result_array() as $row)
{
return $row;
}
}
}
I've checked many times mispelled word, but everything seems to be ok !!
I'm lost !
Thank for your help !