Answer the question
In order to leave comments, you need to log in
PHP can't set smart cookie
Hello %username%!
There is a website that sets this cookie:
Set Cookie: Cart=1689949376348582,1,2534374306259466;
setrawcookie('Cart', '1689949376348582,1,2534374306259466', 0 ,'/');
setcookie('Cart', '1689949376348582,1,2534374306259466', 0 ,'/');
Set-Cookie: Cart=1689949376348582%2C1%2C2534374306259466;
Answer the question
In order to leave comments, you need to log in
try
header('Set Cookie: Cart=1689949376348582,1,2534374306259466;');
it works!
True, in my case, ngnix is still hanging out and not everything is in order there.
There was one problem with the header (Set-Cookie)
When the command is called again, the header overwrites the old setting. The solution is:
The second parameter in the header command is the header rewrite flag.
Maybe someone will come in handy.
header ("Set-Cookie: {$cookie1}", FALSE);
header ("Set-Cookie: {$cookie2}", FALSE);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question