对于新版本来说,用POST方式发送的数据放在$_POST数组里面.
用$_POST["变量名"]的方法使用对于旧版本和打开register_global=On的来说,无所谓,照用.

解决方案 »

  1.   

    直接用变量应该可以吧!post和get都行啊.
      

  2.   

    function send_headers ($fp) {
            fputs ($fp, "Accept: */*\n");
            fputs ($fp, "Accept-Language: en\n");
            fputs ($fp, "Connection: Keep-Alive\n");
            fputs ($fp, "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\n");
        }    // post data and return reply
        function post_data ($host, $url, $data) {
            $fp = @fsockopen ($host, 80, $errno, $errstr, 120);
            $ret = "";
                    if (strncasecmp ($url, "http://", 7) == 0) $url = substr ($url, 7);
            $p = strpos ($url, '/');
            if (empty ($p)) {
                $req = "/";
            } else {
                $req = substr ($url, $p);
            }
            if ($fp) {
                fputs ($fp, "POST $req HTTP/1.0\n");
                send_headers ($fp);
                fputs ($fp, "Content-type: application/x-www-form-urlencoded\n");
                $out = "";
                while (list ($k, $v) = each ($data)) {
                    if(strlen($out) != 0) $out .= "&";
                    $out .= rawurlencode($k). "=" .rawurlencode($v);
                }
                $out = trim ($out);
                fputs ($fp, "Content-length: ".strlen($out)."\n\n"); 
                fputs ($fp, "$out");
                fputs ($fp, "\n");
                while(!feof($fp)){ 
                    $ret .= fgets($fp,128); 
                } 
            fclose ($fp);
            }
            return $ret;
        }
    // example how to use:// following code will post variables "login" and "pass" to server "www.something.com" script "/submit.php"
    $reply = post_data ("www.something.com", "/submit.php", array ("login" => $username, "pass" => $password));
      

  3.   

    响应的php中用phpinfo();就知道了
      

  4.   

    我试过了,用phpinfo()看不出来的.
      

  5.   

    变量
    $HTTP_POST_VARS
    文件
    $HTTP_POST_FILES
      

  6.   

    晕~本地机子的phpinfo()怎么会被屏蔽....
      

  7.   

    晕~本地机子的phpinfo()怎么会被屏蔽....
      

  8.   

    晕~本地机子的phpinfo()怎么会被屏蔽....
      

  9.   

    //接收的post数据
    $data = $GLOBALS["HTTP_RAW_POST_DATA"];
      

  10.   

    接收的post数据
    $data = $GLOBALS["HTTP_RAW_POST_DATA"];