• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can not set cookie in ci4

#1
unable to set and get cookie in ci4
PHP Code:
if(! $this->response->hasCookie('test'))
        {
            $cookie = [
                    'name'   => 'test',
                    'value'  => 'The Value',
                    'expire' => '86500',
                    'path'   => '/',
                    'secure' => TRUE,
                    'httponly' => FALSE
            
];
            
            $show 
$this->response->setCookie($cookie);
            echo 'cookie set!';
        
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.