Home >Backend Development >PHP Tutorial >PHP COOKIE takes effect immediately and can be used without refreshing
Usually, in php, such a piece of code requires the browser to refresh before the cookie can appear. How can I make the cookie take effect in time? I would like to share a method to make the cookie take effect in time. It is very practical. The code is as follows:
In this way, you can get the cookie value directly without refreshing. Please see the php manual for cookie parameter details.
|