• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Codeigniter not setting correct expire time for cookie

#2
I have got it working now so far I was using the input->set_cookie(). For me that was causing a bit of issue now using the cookie helper seems to set correct times and other stuff as well.

On my Client.php library

PHP Code:
public function write_cookie($data = array()) {
        $data serialize($data);

        $data $this->CI->encryption->encrypt($data);
      
        $cookie_input 
= array(
        'name' => $this->cookie_name, 
        
'value' => $data, 
        
'expire' =>'86500', 
        
'domain' => '.project-ask.com',
        'path' => '/', 
        
'prefix' => $this->prefix
        
);

        return set_cookie($cookie_input);

There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
RE: Codeigniter not setting correct expire time for cookie - by wolfgang1983 - 04-09-2017, 09:07 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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