메신저 희한와 유래에 새로운 메신저, 나는 몇 가지 문제를 가지고 그건 :컬 POST 데이터 문제
메신저 제대로 내 요청에 페이지와 페이지 대답에 직접 몇 페이지를 전송,하지만 난 때 포스트 데이터를 전송하려고 PHP로 컬을 사용하여 페이지는 어디 반응하지 않는 : method="post"
에
<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 좋습니다 !!!!! method = "post" – BobAlexy
지금 왼쪽에있는 해당 체크 표시를 누르십시오 :) –
헤이 맨 r 농담? 내 질문에 대답 할 수 있다면 그렇게해라. 내 질문 페이지에서 빠져 나올 수 없다면, 괜찮아? – BobAlexy