<legend id='1Pdjo'><style id='1Pdjo'><dir id='1Pdjo'><q id='1Pdjo'></q></dir></style></legend>

      1. <tfoot id='1Pdjo'></tfoot>

        <small id='1Pdjo'></small><noframes id='1Pdjo'>

        • <bdo id='1Pdjo'></bdo><ul id='1Pdjo'></ul>
        <i id='1Pdjo'><tr id='1Pdjo'><dt id='1Pdjo'><q id='1Pdjo'><span id='1Pdjo'><b id='1Pdjo'><form id='1Pdjo'><ins id='1Pdjo'></ins><ul id='1Pdjo'></ul><sub id='1Pdjo'></sub></form><legend id='1Pdjo'></legend><bdo id='1Pdjo'><pre id='1Pdjo'><center id='1Pdjo'></center></pre></bdo></b><th id='1Pdjo'></th></span></q></dt></tr></i><div id='1Pdjo'><tfoot id='1Pdjo'></tfoot><dl id='1Pdjo'><fieldset id='1Pdjo'></fieldset></dl></div>
      2. 如何将 GET 和 POST 数据传递给 php 可执行文件?

        How to pass GET and POST data to the php executable?(如何将 GET 和 POST 数据传递给 php 可执行文件?)
            <tfoot id='1QHPy'></tfoot>

              <bdo id='1QHPy'></bdo><ul id='1QHPy'></ul>
                <tbody id='1QHPy'></tbody>
              <i id='1QHPy'><tr id='1QHPy'><dt id='1QHPy'><q id='1QHPy'><span id='1QHPy'><b id='1QHPy'><form id='1QHPy'><ins id='1QHPy'></ins><ul id='1QHPy'></ul><sub id='1QHPy'></sub></form><legend id='1QHPy'></legend><bdo id='1QHPy'><pre id='1QHPy'><center id='1QHPy'></center></pre></bdo></b><th id='1QHPy'></th></span></q></dt></tr></i><div id='1QHPy'><tfoot id='1QHPy'></tfoot><dl id='1QHPy'><fieldset id='1QHPy'></fieldset></dl></div>
            • <legend id='1QHPy'><style id='1QHPy'><dir id='1QHPy'><q id='1QHPy'></q></dir></style></legend>

              <small id='1QHPy'></small><noframes id='1QHPy'>

                  本文介绍了如何将 GET 和 POST 数据传递给 php 可执行文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在用 C# 编写一个 Web 服务器,并且我正在尝试添加对 PHP 的支持.我大部分时间都在工作,除了我不知道如何在将文件传递给 PHP 可执行文件时将 GET 和 POST 数据传递给它.我一直在使用 GET 进行测试,因为我还没有在服务器上处理 POST 请求,并且我将传递的参数字符串分开,但我不知道如何将信息提供给 php 解析器.一些提示将不胜感激.

                  I am writing a web server in C# and I'm trying to add support for PHP. I have it mostly working, except I don't know how to past GET and POST data to the PHP executable when i pass the file to it. I've been testing with GET since I haven't gotten to getting POST requests handled on the server, and I have the string of the arguments that gets passed separated, but I don't know how to feed the information to the php parser. Some tips would be appreciated.

                  推荐答案

                  对于 GET:简单的方法(我找到了):

                  For GET: The Easy Way (That i've found):

                  php-cgi.exe <script-file-name> <parameter1>=<value1> <parameter2>=<value2> [...] <parameterN>=<valueN>
                  

                  更难的方法(通过 php-cgi 和 windows cli)是:

                  The Harder Way (via php-cgi and windows cli) would be:

                  SET "QUERY_STRING=<parameter1>=<value1>&<parameter2>=<value2>&[...]&<paramterN>=<valueN>"
                  SET SCRIPT_NAME=<script-file-name>
                  SET REQUEST_METHOD=GET
                  SET REDIRECT_STATUS=0
                  php-cgi.exe
                  

                  我假设有一种方法可以通过 C#/.Net 设置环境变量.php-cgi.exe 完成后,必须取消设置环境变量.

                  I'd assume there would be a way to set environment variable via C#/.Net. The environment variables would have to be unset after php-cgi.exe completes.

                  有关您可以在 http://上设置的 CGI 环境变量(以及一般的 CGI)的更多信息www.ietf.org/rfc/rfc3875.txt.PHP 的 $_SERVER 变量文档也可能有用.php.net 上的 PHP 文档中也有将 PHP 作为 CGI 运行的安全注意事项.

                  More info for CGI environment variables you could set (and CGI in general) at http://www.ietf.org/rfc/rfc3875.txt. Might also be of use would be PHP's $_SERVER variable documentation. Security considerations for running PHP as CGI also in PHP documentation at php.net.

                  这篇关于如何将 GET 和 POST 数据传递给 php 可执行文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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='6l21M'></tbody>
                  <i id='6l21M'><tr id='6l21M'><dt id='6l21M'><q id='6l21M'><span id='6l21M'><b id='6l21M'><form id='6l21M'><ins id='6l21M'></ins><ul id='6l21M'></ul><sub id='6l21M'></sub></form><legend id='6l21M'></legend><bdo id='6l21M'><pre id='6l21M'><center id='6l21M'></center></pre></bdo></b><th id='6l21M'></th></span></q></dt></tr></i><div id='6l21M'><tfoot id='6l21M'></tfoot><dl id='6l21M'><fieldset id='6l21M'></fieldset></dl></div>
                1. <small id='6l21M'></small><noframes id='6l21M'>

                  <tfoot id='6l21M'></tfoot>

                    <bdo id='6l21M'></bdo><ul id='6l21M'></ul>
                      <legend id='6l21M'><style id='6l21M'><dir id='6l21M'><q id='6l21M'></q></dir></style></legend>