我在 php 上发送发布请求,发布后我想显示感谢信息,我的邮政编码是:
<?php
$error = '';
$FullName = $_POST['FullName'];
$Email = $_POST['Email'];
$Password = $_POST['Password'];
$Content = $FullName." ".$Email." ".$Password;
$server= '192.168.1.13:3033';
$path = '/user/registration';
$headers= "POST $path HTTP/1.0\r\nContent-type: text/html\r\nHost: $server\r\nContent-length: $Content\r\n\r\n";
$fp = fsockopen($server, $port);
if (!$fp) return false;
fputs($fp, $headers);
fputs($fp, $Content);
$ret = "";
while (!feof($fp)) {
$ret.= fgets($fp, 1024);
}
fclose($fp);
print $ret;
?>
我的帖子请求正在运行,但我不知道如何在同一页面上显示消息任何帮助将不胜感激