Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
谁能告诉我为什么这段 javascript 代码
result=JSON.parse(result); alert("errori :"+result);
当返回 JSON 的 php 页面是这个时,给我一个错误
<?php $var="a"; $var2="b"; echo json_encode(array("1"=>$var,"2"=>$var2)); die; ?>
? 错误是:“JSON.parse:意外字符。”