0
function do_post_request($url, $data, $optional_headers = null)
{
$params = array('http' => array(
'method' => 'POST',
'content' => $data
));
if ($optional_headers !== null) {
$params['http']['header'] = $optional_headers;
}
$ctx = stream_context_create($params);
$fp = @fopen($url, 'rb', false, $ctx);
if (!$fp) {
throw new Exception("Problem with $url, $php_errormsg");
}
$response = @stream_get_contents($fp);
if ($response === false) {
throw new Exception("Problem reading data from $url, $php_errormsg");
}
return $response;
}
不POST數組:處理HTTP郵政與陣列(沒有捲曲)
$postdata = array(
'send_email' => $_REQUEST['send_email'],
'send_text' => $_REQUEST['send_text']);
我怎樣才能得到獨立的數組元素個別PHP變種? POST數據處理器的頁面
部分:
...
$message = $_REQUEST['postdata']['send_text'];
...
什麼錯?
你可以嘗試弄清楚到底是什麼問題,您有?你是否收到任何錯誤訊息?或者是與另一端的腳本相關的問題,即您要發送數據的頁面? – DaveRandom
POST數據處理器不顯示任何內容,它什麼也收不到。 – Crone
...所以如果你print_r($ _ REQUEST);'? – DaveRandom