Enable the PHP cookie to take effect immediately without refreshing it. The copy code is as follows: the PHPCOOKIE setting function takes effect immediately. Functioncookie ($ var, $ value, $ time0, $ path, $ domain) {$ _ COOKIE [$ var] $ value; if (is_array ($ value) {f
The code is as follows:
// The php cookie setting function takes effect immediately.
Function cookie ($ 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 );
}
}
The http://www.bkjia.com/PHPjc/323075.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/323075.htmlTechArticle code is as follows: // The php cookie setting function takes effect immediately. Function cookie ($ var, $ value = '', $ time = 0, $ path ='', $ domain = '') {$ _ COOKIE [$ var] = $ value; if (is_array ($ value) {f...