從網(wǎng)站上抓取頁面并將數(shù)據(jù)存儲為JSON文件,并從網(wǎng)站上檢查了有效的JSON數(shù)據(jù),我想從laravel上的該文件中獲取數(shù)據(jù),下面作為JSON數(shù)據(jù),任何人都可以幫助解決此問題。[{ "data": { "entityUrn": "urn:li:collectionResponse:5uIVHMD1bTeNoD/BP3JgR7QsIAu/CVRllprBLkKJgR8=", "paging": { "start": 0, "count": 10, "links": [], "$recipeTypes": ["com.linkedin.voyager.dash.deco.common.FullPaging"] } }}]
1 回答

慕容森
TA貢獻1853條經(jīng)驗 獲得超18個贊
您可以使用file_get_contents將 JSON 內(nèi)容從文件加載到變量中。
$content = file_get_contents('test.json');
$arrContent = json_decode($content, true);
- 1 回答
- 0 關(guān)注
- 61 瀏覽
添加回答
舉報
0/150
提交
取消