Session lost after redirect in Codeigniter

前端 未结 13 2403
清歌不尽
清歌不尽 2021-02-05 06:39

I\'m using codeigniter as a framework.

Firstly, I use localhost but when I change to my IP address the login function doesn\'t work anymore. I found that th

13条回答
  •  我在风中等你
    2021-02-05 07:00

    I solved this problem by configuring the $config['cookie_domain'] to localhost

    $config['cookie_domain']    = "localhost";
    

    i initially had that variable set to fully qualified domain name such as www.exampledomain.com but meanwhile i was using a local server.

    The domain that your script is running under should be the same as the domain set under $config['cookie_domain] to avoid unexpected failure with codeigniter session class.

提交回复
热议问题