Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/264.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
file_get_contents没有返回PHP中的完整数据_Php_Json - Fatal编程技术网

file_get_contents没有返回PHP中的完整数据

file_get_contents没有返回PHP中的完整数据,php,json,Php,Json,在解析下面的代码时,file_get_contentsurl只返回部分数据,而不是完整数据。清除浏览历史记录并运行相同的代码后,$data3中还有一些数据可用,但仍然无法检索URL中的完整数据 您能否建议如何解决此问题以从URL检索所有数据 PHP代码: $results = file_get_contents('urllink'); $json_array = json_decode($results, true); foreach ($json_array as $value) {

在解析下面的代码时,file_get_contentsurl只返回部分数据,而不是完整数据。清除浏览历史记录并运行相同的代码后,$data3中还有一些数据可用,但仍然无法检索URL中的完整数据

您能否建议如何解决此问题以从URL检索所有数据

PHP代码:

$results = file_get_contents('urllink');
$json_array = json_decode($results, true);

foreach ($json_array as $value) {

    $key1 = $value["LineageId"];
    $url = "urllink.$key1.apikey";
    echo $url;
    $data3 = file_get_contents($url);
    echo $data3;
}

好的,包括一些更多的信息,比如urllink文件或urllink的内容。$key1.apikey。您希望接收多少数据,大约以MB为单位?