时间:2021-07-01 10:21:17 帮助过:8人阅读
$value["name"]= urlencode("我的姓名");
$value["pass"]= urlencode("pass888");
$value["age"]=30;
$jsonstr =json_encode($value);
$url="http://127.0.0.1:8080/get.php?id=100&value=$jsonstr";
$html = file_get_contents($url);
echo $html;
?>
get.php文件如下:
$x = json_decode(stripslashes ($_GET["value"]), true);
echo urldecode($x["name"]);
echo urldecode($x["pass"]);
?>
http://www.bkjia.com/PHPjc/477326.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/477326.htmlTechArticlegettest.php文件: ?php $value[name]= urlencode(我的姓名); $value[pass]= urlencode(pass888); $value[age]=30; $jsonstr =json_encode($value); $url=http://127.0.0.1:8080/get.php...