我想做的是以下是我试图将数据自动发布到另一个网址
$postid = $_POST['new'];
$tt = file_get_contents("new1.php");
解决方法:
利用cURL来做到这一点
if(isset($_POST['new']))
{
$postid = $_POST['new'];
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, 'new1.php');
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, "data=$postid");
$result = curl_exec($ch);
echo $result;
curl_close($ch);
}