setCookie()的问题~~~~~~~~~~~~~~~~~~~~~~~
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->setCookie('test<strong style="color:transparent">本文来源gaodai#ma#com搞@@代~&码*网/</strong><strong>搞gaodaima代码</strong>1', 10, 0);setCookie('test2', 20, 0);var_dump($_COOKIE);
当我运行这个脚本的时候,为什么第一次$_COOKIE是array(0) {},空数组。
必须得刷新一次才能把test1和test2的值刷出来?
——解决方案——————–
要等下一次浏览器把cookie传过来才能调用