Session data available in MY_Log? |
[eluser]Aken[/eluser]
You're running into two problems here: 1) You can't use $this->session in your Log library, because it does not extend the CI superobject like a controller or model. You'll need to use get_instance() as explained in Utilizing CodeIgniter Resources within Your Library. 2) The Log library is used many times both before the CI superobject exists, and before any libraries are autoloaded to that CI object. So you need to check if both exist before trying to access them, or you'll get errors. Try something like this: /application/libraries/MY_Log.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Messages In This Thread |
Session data available in MY_Log? - by El Forum - 10-29-2012, 12:19 PM
Session data available in MY_Log? - by El Forum - 10-29-2012, 04:01 PM
Session data available in MY_Log? - by El Forum - 11-01-2012, 10:10 AM
|