Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/251.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/14.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
Php 链接中出现意外的T_回音?_Php_Json - Fatal编程技术网

Php 链接中出现意外的T_回音?

Php 链接中出现意外的T_回音?,php,json,Php,Json,我对php中的echo有一个小问题 if (isset($_GET['id']) && is_numeric($_GET['id'])) { $id = $_GET['id']; // copy file content into a string var $json_file = file_get_contents('link.com?id_select='echo $id;'); 如何在链接中显示GET ID的值 谢谢您需要使用串联,您可以使用这样的点: $json_f

我对php中的echo有一个小问题

if (isset($_GET['id']) && is_numeric($_GET['id'])) {
$id = $_GET['id'];  
// copy file content into a string var
$json_file = file_get_contents('link.com?id_select='echo $id;');
如何在链接中显示GET ID的值


谢谢您需要使用串联,您可以使用这样的点:

$json_file = file_get_contents('link.com?id_select='.$id);

谢谢,因为你做得不正确。请这样做:
index.php?id_select='.$id.&op_select
下次在问题中添加整个url。很抱歉,下次我会记住它。谢谢你的帮助,我马上就去看医生:)