<?php
$message=$_POST["msg"];
echo $message;
// create a new cURL resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://.../pl1.php?
m=$message");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close cURL resource, and free up system resources
curl_close($ch);
?>
上面的代碼是IAM using.anyone建議我我如何得到m的值pl1.php如何從捲曲得到變量值
我收到以下錯誤: 您的瀏覽器發送的請求該服務器無法理解。
'$ _GET ['m']''如何?這是PHP 101.在將其添加到URL之前,您還應該[urlencode](http://php.net/manual/en/function.urlencode.php)該消息。 –
如果我們假設你的代碼沒有任何錯誤,並且它發送的請求正確,這應該在'pl1.php' - >'$ mMessage = $ _GET ['m'];''應該工作。 –
因此,有沒有任何建議爲你工作?有些反饋會很好。 –