0
IM的bizzare和計算器即時通訊新的,我有一些問題,這就是:捲曲POST數據問題
IM直接正確地將一些頁面,一個頁面,頁面回答了我的要求,但我在嘗試發送POST數據使用cURL通過PHP的頁面沒有任何地方反應:
<form action="http://remotehost.com/index.aspx" method="post"> -> its work correctly and the index.php show me what i want but when :
<form action ="http://localhost/fetch_data.php" mthod="post"> ->
fetch_data.php:
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<?php
print_r($_POST);
$remotehost_cgi = 'http://remotehost.com/index.aspx';
$ret = post_data($_POST, $remotehost_cgi);
echo $ret;
?>
<?php
function post_data($datatopost,$urltopost){
$crl = curl_init ($urltopost);
curl_setopt ($crl, CURLOPT_POST, true);
curl_setopt ($crl, CURLOPT_POSTFIELDS, $datatopost);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, true);
$returndata = curl_exec ($crl);
return $returndata;
}
?>
:-j好的!!!!!方法=「發佈」 – BobAlexy 2010-12-23 00:03:58
現在按左邊的複選標記:) – 2010-12-23 00:07:58