这是我用来打印我从文件读到网页的json的代码。我读的releases.json的json文件相当大,确切地说是6.97 mb。
<?php
$json = json_decode(file_get_contents('./releases.json'), true);
$data = json_decode($json, TRUE);
header('Content-Type: application/json');
echo json_encode($data);
但它会返回以下错误:
502 Bad Gateway
PhpStorm 2017.3.2
谢谢,当我尝试使用较小的json文件时,它可以正常工作