POST到php并返回包含已发布数据的页面


POST to php and return page with posted data

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

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

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

您可以使用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);
});