0

我有一个 download.php 文件和一个 index.php 文件。我希望 download.php 将数据发布到 index.php,然后在浏览器窗口中显示 index.php,其中包含发布的数据。这可能吗?我以为我可以为此使用 curl ,但这不起作用。请帮我。

4

2 回答 2

0

您可以使用jQuery.post()

//post the data
$.post('ajax/test.html',{ name: "test", time: "2pm" }, function(data) {

    //replace the .result div with the
    //response from the server
    $('.result').html(data);

});      
于 2012-07-24T00:41:48.813 回答
0

你的代码出了什么问题?您可以使用卷曲。

试试这个:http ://www.askapache.com/php/sending-post-form-data-php-curl.html

于 2012-07-24T00:33:57.493 回答