Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7064485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:50:25+00:00 2026-05-28T04:50:25+00:00

So basically, the below is the code I have right now: class MY_Log extends

  • 0

So basically, the below is the code I have right now:

class MY_Log extends CI_Log {

    /**
    * Variable storing the CodeIgniter instance.
    *
    * @access private
    * @since v0.1.0.0
    */
    private $CI;

    /**
    * Constructor for later use by internal
    * methods.
    *
    * @access public
    * @since v0.1.0.0
    */
    public function __construct()
    {
        // Extend the parent logging.
        parent::__construct();

        $this->$CI =& get_instance();
    }
}

And I get the following error;

Fatal error: Class 'CI_Controller' not found in /<deleted>/system/core/CodeIgniter.php on line 233

This is kinda how the user guide describes it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:50:25+00:00Added an answer on May 28, 2026 at 4:50 am

    Quite strange. I just replicated your case (with the info provided) and I encountered no problems. But make sure of a couple things:

    1. Your file is named MY_Log.php, and is located in application/libraries/My_log.php
    2. The file extends the parent class, in this case CI_Log
    3. You call the library in your controller as

      $this->load->library('log');
      $this->log->do_something();
      

      i.e, not using “My_log” but the parent library’s name. In fact, you’re extending it, not creating a different one, so CI wants you to call it the same as the original

    4. Your original file has the following line correctly written (without the $ sign before CI)

      $this->CI =& get_instance();
      

    My test case with your code provided works fine on my development machine (Windows 7 WAMP php 5.3.8). I’ll be waiting for more infos.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically this code below returns the right information, but I need to add the
Below I have some code which basically animates a div from the bottom of
My code below won't compile. What am i doing wrong? I'm basically trying to
Basically i want to do the below in .NET but i have no idea
I have the below query, which basically it retrieves the 5 top most books
Basically I have some code to check a specific directory to see if an
I have some code that does custom drawing. Basically it is form fill program
I have the jquery below which basically pre-populates a text box. (It actually populates
I have a problem with the following javascript code. Basically I want to run
I'm having trouble with a for loop in my program. Right now I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.