0
我有一個掛鉤,如果會話爲空,基本上會引發用戶登錄頁面。在codeigniter中定義一個常量變量掛鉤
$hook['post_controller_constructor'] = array(
'class' => 'Status',
'function' => 'logInCheck',
'filename' => 'hooks.php',
'filepath' => 'hooks',
'params' => array()
);
現在的logInCheck
鉤子函數我要定義一些常量變量。當我GOOGLE時,我發現常量只能在constants.php或config.php中定義。現在我的查詢是在一個鉤子文件中定義它。
當我嘗試這樣做define('HEADERFILE', 'deafult_header');
我收到此錯誤
消息:使用未定義的常量HEADERFILE的 - 假設 'HEADERFILE'
那麼,如何定義一個常數內一個鉤子文件?
在此先感謝
正如我所說我設置常量在會話檢查鉤子文件,所以我不能使用它在配置文件 – 2013-03-09 17:04:44