<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Worklog extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->helper('url');
$this->load->model('worklog_model');
$this->load->library('tank_auth');
$this->lang->load('tank_auth');
}
public function index()
{
return $this->view_calendar();
}
public function view_calendar($year = NULL, $month = NULL)
{
if (!$this->tank_auth->is_logged_in()) redirect(site_url('auth/'));
...
에러가 다음과 같이 나옵니다:Severity: Notice
Message: Undefined property: Worklog::$tank_auth
Filename: controllers/worklog.php
Line Number: 22
DEBUG - 2013-09-27 03:01:41 --> Library 'tank_auth' is loading... DEBUG - 2013-09-27 03:01:41 --> ci_load_class: 'tank_auth' is loading... DEBUG - 2013-09-27 03:01:41 --> ci_init_class: 'tank_auth' is creating... DEBUG - 2013-09-27 03:01:41 --> ci_init_class: class name is 'Tank_auth'... DEBUG - 2013-09-27 03:01:41 --> Config file loaded: application/config/tank_auth.php DEBUG - 2013-09-27 03:01:41 --> Library 'session' is loading... DEBUG - 2013-09-27 03:01:41 --> ci_load_class: 'session' is loading... DEBUG - 2013-09-27 03:01:41 --> ci_init_class: 'session' is creating... DEBUG - 2013-09-27 03:01:41 --> ci_init_class: class name is 'MY_Session'... DEBUG - 2013-09-27 03:01:41 --> Session Class Initialized DEBUG - 2013-09-27 03:01:41 --> Session routines successfully run DEBUG - 2013-09-27 03:01:41 --> Model Class Initialized DEBUG - 2013-09-27 03:01:41 --> Helper loaded: cookie_helper DEBUG - 2013-09-27 03:01:41 --> Tank_auth Class Initialized DEBUG - 2013-09-27 03:01:41 --> Language file loaded: language/english/tank_auth_lang.php ERROR - 2013-09-27 03:01:41 --> Severity: Notice --> Undefined property: Worklog::$tank_auth C:\public\htdocs\minolta\application\controllers\worklog.php 17로그를 보면 정상적으로 ci_init_class()에 의해 변수 이름 tank_auth가 생성이 됬습니다. 따라서 적어도 tank_auth는 object가 되어야 하나 var_dump($this->tank_auth)를 찍으니 NULL값이 나옵니다.... 미친 거같아요.