(Switch) let the PHP cookie take effect in time. you can see this in php100 without refreshing it. let's turn it over and show it to you. it's useless and I didn't test it. usually, such a piece of code in php. click it in the browser. before the cookie appears .. how can we make the cookie take effect in a timely manner and share a very practical method to make the cookie take effect in a timely manner. the code is as follows: PHPcode/P (convert) to make the php cookie take effect in a timely manner, you can use it without refreshing
I can see this in php100, and I will show it to you. it does not work and I have no test.
Usually, such a piece of code in php. click it in the browser. before the cookie appears .. how can we make cookies take effect in a timely manner and share a practical method to make them take effect in a timely manner. the code is as follows:
PHP code
// The php cookie setting function takes effect immediately and supports array function cookies ($ var, $ value = '', $ time = 0, $ path ='', $ domain = '') {$ _ COOKIE [$ var] = $ value; if (is_array ($ value) {foreach ($ value as $ k = >$ v) {setcookie ($ var. '['. $ k. ']', $ v, $ time, $ path, $ domain, $ s) ;}} else {setcookie ($ var, $ value, $ time, $ path, $ domain, $ s );}}
------ Solution --------------------
I really don't know what the original author thinks?
The cookie value is provided by you and is conditional.
Do I lie to myself when I assign a value to $ _ COOKIE?
------ Solution --------------------
What is $ s?
------ Solution --------------------
I don't understand. I saw it the first time.