[問題] ajax post send的parameter
parameters='action=edit§ion=new&title=hello&text=hello&format=xml&token='
+ edittoken;
上面這是我send的parameter
token是+\
可是接收的頁面收到的卻是\\
我有setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
然後我自己在這個頁面印出parameters是這樣
action=edit§ion=new&title=hello&text=hello&format=xml&token=+\
好像是因為§會被當作那個符號 不過送過去section是有接收到
所以應該跟這沒有關係
token要怎麼樣才能正確的送過去呢?
用encodeURIComponent跟encodeURI編碼edittoken好像也不行
這個問題卡了我快一個星期了...
-------------------------------------------------------------------------
我在responsetext印出來的結果是這樣
<?
echo $_POST['title'].'<br>';
echo $_POST['section'].'<br>';
echo $_POST['action'].'<br>';
echo $_POST['text'].'<br>';
echo $_POST['format'].'<br>';
echo $_POST['token'].'<br>';
?>
hello
new
edit
hello
xml
\\
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.211.217.211
※ 編輯: tn801534 來自: 218.211.217.211 (07/07 09:15)
※ 編輯: tn801534 來自: 218.211.217.211 (07/07 09:17)
※ 編輯: tn801534 來自: 218.211.217.211 (07/07 09:43)
→
07/07 09:46, , 1F
07/07 09:46, 1F
→
07/07 09:46, , 2F
07/07 09:46, 2F
→
07/07 09:48, , 3F
07/07 09:48, 3F
→
07/07 10:03, , 4F
07/07 10:03, 4F
→
07/07 10:09, , 5F
07/07 10:09, 5F
→
07/07 10:09, , 6F
07/07 10:09, 6F
→
07/07 10:34, , 7F
07/07 10:34, 7F
→
07/07 10:37, , 8F
07/07 10:37, 8F
→
07/07 10:37, , 9F
07/07 10:37, 9F
→
07/07 10:37, , 10F
07/07 10:37, 10F
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章
40
171