我在Codeigniter 3
上。我最近安裝Community Auth
和我收到的錯誤:Codeigniter Community AUth使用未定義的常量USE_SSL
Use of undefined constant USE_SSL - assumed 'USE_SSL'".
當我更改代碼以到USE_SSL
,錯誤被解決,但我要確保這是正確的解決辦法,USE_SSL
是不是有些全局變量或功能與常數,但我沒有看到任何關於Codigniter
論壇。
我在Codeigniter 3
上。我最近安裝Community Auth
和我收到的錯誤:Codeigniter Community AUth使用未定義的常量USE_SSL
Use of undefined constant USE_SSL - assumed 'USE_SSL'".
當我更改代碼以到USE_SSL
,錯誤被解決,但我要確保這是正確的解決辦法,USE_SSL
是不是有些全局變量或功能與常數,但我沒有看到任何關於Codigniter
論壇。
已解決。我在我的cofig文件中使用了禁用的鉤子。
是的第一步必須是 $ config ['enable_hooks'] = TRUE; 和第二在/application/config/hooks.php 添加這些行
$hook['pre_system'] = array(
'function' => 'auth_constants',
'filename' => 'auth_constants.php',
'filepath' => 'hooks'
);
$hook['post_system'] = array(
'function' => 'auth_sess_check',
'filename' => 'auth_sess_check.php',
'filepath' => 'hooks'
);
某處代碼,你有'USE_SSL'代替''USE_SSL''反之亦然。定義常量時,必須使用引號。使用時請使用不帶引號。 – Tpojka