Welcome Guest, Not a member yet? Register   Sign In
Can't acccess personnal library
#1

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 :
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 !
Reply


Messages In This Thread
Can't acccess personnal library - by Theo - 07-22-2016, 05:06 AM
RE: Can't acccess personnal library - by Avenirer - 07-22-2016, 06:07 AM
RE: Can't acccess personnal library - by Theo - 07-22-2016, 06:22 AM
RE: Can't acccess personnal library - by Wouter60 - 07-23-2016, 01:39 AM
RE: Can't acccess personnal library - by Theo - 07-23-2016, 04:08 AM
RE: Can't acccess personnal library - by PaulD - 07-23-2016, 04:33 AM
RE: Can't acccess personnal library - by Theo - 07-24-2016, 03:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB