Welcome Guest, Not a member yet? Register   Sign In
Call to a member function on a non-object
#11

[eluser]Cristian Gilè[/eluser]
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Security
{
    var $ci;
    
    function __construct()
    {
       $this->ci =& get_instance();
    }    

    function is_logged_in($logged_in)
    {
       ........
       ........
       ........

then, to access to uri and session libraries methods:

Code:
$segment = $this->ci->uri->segment();
$priv = $this->ci->session->userdata($segment);

Cristian Gilè


Messages In This Thread
Call to a member function on a non-object - by El Forum - 01-13-2011, 09:10 AM
Call to a member function on a non-object - by El Forum - 01-13-2011, 09:22 AM
Call to a member function on a non-object - by El Forum - 01-13-2011, 11:37 AM
Call to a member function on a non-object - by El Forum - 01-13-2011, 11:38 AM
Call to a member function on a non-object - by El Forum - 01-13-2011, 11:39 AM
Call to a member function on a non-object - by El Forum - 01-13-2011, 12:12 PM
Call to a member function on a non-object - by El Forum - 01-13-2011, 12:21 PM
Call to a member function on a non-object - by El Forum - 01-13-2011, 12:50 PM
Call to a member function on a non-object - by El Forum - 01-13-2011, 02:15 PM
Call to a member function on a non-object - by El Forum - 01-13-2011, 02:30 PM
Call to a member function on a non-object - by El Forum - 01-13-2011, 02:54 PM
Call to a member function on a non-object - by El Forum - 01-13-2011, 02:55 PM
Call to a member function on a non-object - by El Forum - 05-26-2011, 12:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB