Session not working in basecontroller |
I work on CI4.
When I add "$this->session = Services :: session();", I will be get a error message : ( How to slove it, plz ? ) PHP Code: Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at C:\Users\proj\app\Config\Events.php:27) in C:\Users\proj\anaso\system\Debug\Exceptions.php:162 Stack trace: #0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'Cannot modify h...', 'C:\\Users\\proj\\...', 162, Array) #1 C:\Users\proj\anaso\system\Debug\Exceptions.php(162): header('HTTP/1.1 500 In...', true, 500) #2 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #3 {main} thrown in C:\Users\proj\anaso\system\Debug\Exceptions.php on line 162 My BaseController PHP Code: <?php |
Messages In This Thread |
Session not working in basecontroller - by hoffmanchan - 05-11-2020, 09:33 PM
RE: Session not working in basecontroller - by nmaa3003 - 05-12-2020, 06:24 AM
RE: Session not working in basecontroller - by hoffmanchan - 05-12-2020, 08:21 AM
|