<small id='qrOmS'></small><noframes id='qrOmS'>

<legend id='qrOmS'><style id='qrOmS'><dir id='qrOmS'><q id='qrOmS'></q></dir></style></legend>

    <i id='qrOmS'><tr id='qrOmS'><dt id='qrOmS'><q id='qrOmS'><span id='qrOmS'><b id='qrOmS'><form id='qrOmS'><ins id='qrOmS'></ins><ul id='qrOmS'></ul><sub id='qrOmS'></sub></form><legend id='qrOmS'></legend><bdo id='qrOmS'><pre id='qrOmS'><center id='qrOmS'></center></pre></bdo></b><th id='qrOmS'></th></span></q></dt></tr></i><div id='qrOmS'><tfoot id='qrOmS'></tfoot><dl id='qrOmS'><fieldset id='qrOmS'></fieldset></dl></div>

      • <bdo id='qrOmS'></bdo><ul id='qrOmS'></ul>

    1. <tfoot id='qrOmS'></tfoot>
    2. PHP用POST数据打开另一个网页

      PHP open another webpage with POST data(PHP用POST数据打开另一个网页)

        <bdo id='O7mpS'></bdo><ul id='O7mpS'></ul>

        <i id='O7mpS'><tr id='O7mpS'><dt id='O7mpS'><q id='O7mpS'><span id='O7mpS'><b id='O7mpS'><form id='O7mpS'><ins id='O7mpS'></ins><ul id='O7mpS'></ul><sub id='O7mpS'></sub></form><legend id='O7mpS'></legend><bdo id='O7mpS'><pre id='O7mpS'><center id='O7mpS'></center></pre></bdo></b><th id='O7mpS'></th></span></q></dt></tr></i><div id='O7mpS'><tfoot id='O7mpS'></tfoot><dl id='O7mpS'><fieldset id='O7mpS'></fieldset></dl></div>

          <tbody id='O7mpS'></tbody>

              <small id='O7mpS'></small><noframes id='O7mpS'>

                <legend id='O7mpS'><style id='O7mpS'><dir id='O7mpS'><q id='O7mpS'></q></dir></style></legend>
                <tfoot id='O7mpS'></tfoot>
              1. 本文介绍了PHP用POST数据打开另一个网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我是 PHP 新手,我正在尝试做一些可能是不好的做法并且很可能是不可能的事情.我基本上只是在拼凑一些东西来测试我的知识,看看 PHP 能做什么.

                I'm new to PHP and I'm trying to do something that may be bad practise and may well be impossible. I'm basically just hacking something together to test my knowledge and see what PHP can do.

                我有一个网页,其中包含收集数据的表单.这被提交给一个 PHP 脚本,该脚本执行一堆处理 - 但实际上并不显示任何重要的东西.我想要的是,一旦处理完成,脚本就会告诉浏览器打开另一个页面,显示结果.

                I have one webpage with a form that collects data. That is submited to a PHP script that does a bunch of processing - but doesn't actually display anything important. What I want is that once the processing is done, the script then tells the browser to open another page, where the results are displayed.

                我知道我可以使用 header('Location: page.php'); 但我不知道如何提供 POST 数据.我怎样才能做到这一点?或者,还有其他方法可以告诉浏览器打开另一个页面吗?

                I know I can use header('Location: page.php'); but I can't work out how to provide POST data with this. How can I do that? Alternatively, is there another way to tell the browser to open another page?

                我从回复中得到的是,可能使用各种黑客来做到这一点,但我最好将处理和显示代码放在一个文件中.我对此很满意;这比什么都重要.

                What I'm taking from the responses is that it's possible to do this using various hacks but I'd be better off to just have the processing and the display code in one file. I'm happy with that; this was an experiment more than anything.

                推荐答案

                真的需要处理完再调用另一个页面吗?我可能会做以下事情:

                Is it really necessary to call another page after the processing is done? I'd probably do the following:

                <form method="post" action="display.php">
                ...
                </form>
                

                display.php:

                display.php:

                if ($_POST) {
                    require_once(process.php);
                    process($_POST);
                    display_results;
                }
                

                包含处理 post 请求所需的代码的 process.php.

                with process.php containing the code necessary for processing the post request.

                或者,您可以使用 cURL 库之类的东西将处理结果传递给您自己指定的页面.不知道这是否真的是你所追求的.

                Alternatively, you could use something like the cURL library to pass the results of the processing to a page specified by yourself. Don't know if that's really what you're after though.

                这篇关于PHP用POST数据打开另一个网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                        <tbody id='RAui0'></tbody>

                        <small id='RAui0'></small><noframes id='RAui0'>

                        <i id='RAui0'><tr id='RAui0'><dt id='RAui0'><q id='RAui0'><span id='RAui0'><b id='RAui0'><form id='RAui0'><ins id='RAui0'></ins><ul id='RAui0'></ul><sub id='RAui0'></sub></form><legend id='RAui0'></legend><bdo id='RAui0'><pre id='RAui0'><center id='RAui0'></center></pre></bdo></b><th id='RAui0'></th></span></q></dt></tr></i><div id='RAui0'><tfoot id='RAui0'></tfoot><dl id='RAui0'><fieldset id='RAui0'></fieldset></dl></div>
                          <bdo id='RAui0'></bdo><ul id='RAui0'></ul>
                          <tfoot id='RAui0'></tfoot>

                        • <legend id='RAui0'><style id='RAui0'><dir id='RAui0'><q id='RAui0'></q></dir></style></legend>