PHP array to jquery array via JSON

后端 未结 4 1608
执念已碎
执念已碎 2021-01-26 10:37

Im having a little confusion why the following is not working.

get.php



        
4条回答
  •  长发绾君心
    2021-01-26 11:20

    Your PHP is claiming that the JSON is HTML. You need to explicitly say it is JSON to get jQuery to handle it as such automatically.

    header("Content-type: application/json");
    

提交回复
热议问题