PHP接受json資料
獲取請求的引數
$input = file_get_contents("php://input");
$input = json_decode($input,true);
var_dump($input);
獲取檔案的json
$input = file_get_contents("../XX.json");
CSDN上的一個老哥少打了一個contents,少打了一個“s”,O(∩_∩)O哈哈~
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/3661.html
標籤:PHP
