我有一個輸出的問題,我似乎無法追查問題顯示出來,這裏是代碼:設置cookie的值,並用PHP
sample.js
var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
var cmonth = myDate.getMonth();
var cdate = myDate.getDate();
var temp1 = m_names[cmonth];
var tempo = escape(temp1 + " " + cdate);
document.cookie=fcookie"=" + tempo;
輸出.PHP
<?php echo implode($_COOKIE)?>
並顯示
713qnihjmdt7mdq8eejvlcd1q1
,但我想顯示存儲在節奏變化之日起,
我試圖直接dispaying節奏variabe並dispalyed正確的輸出,
有什麼建議?我想我需要在PHP端添加一個代碼。
相關:http://stackoverflow.com/questions/5045053/set-cookie-wih-js-read-with-php-problem – jedwards