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

    <tfoot id='vPsQz'></tfoot><legend id='vPsQz'><style id='vPsQz'><dir id='vPsQz'><q id='vPsQz'></q></dir></style></legend>

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

      1. 有没有办法在 php 中的沙箱中执行 php 代码

        时间:2023-05-31
          <bdo id='VDPMk'></bdo><ul id='VDPMk'></ul>

        • <small id='VDPMk'></small><noframes id='VDPMk'>

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

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

                  本文介绍了有没有办法在 php 中的沙箱中执行 php 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想从 php 执行一个 php 脚本,它将使用不同的常量和不同版本的已经定义的类.

                  I want to execute a php-script from php that will use different constants and different versions of classes that are already defined.

                  是否有沙箱 php_module 我可以:

                  Is there a sandbox php_module where i could just:

                  sandbox('script.php'); // run in a new php environment
                  

                  代替

                  include('script.php'); // run in the same environment
                  

                  或者 proc_open() 是唯一的选择吗?

                  Or is proc_open() the only option?

                  PS:该脚本无法通过网络访问,因此 fopen('http://host/script.php') 不是一个选项.

                  PS: The script isn't accessible through the web, so fopen('http://host/script.php') is not an option.

                  推荐答案

                  有 runkit,但是你可能会发现通过命令行调用脚本更简单(使用 shell_exec),如果你不这样做需要主进程和子进程之间的任何交互.

                  There is runkit, but you may find it simpler to just call the script over the command line (Use shell_exec), if you don't need any interaction between the master and child processes.

                  这篇关于有没有办法在 php 中的沙箱中执行 php 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:用于自动登录和表单提交的 PHP 脚本 下一篇:如何安装 bcmath 模块?

                  相关文章

                  <legend id='u1e4v'><style id='u1e4v'><dir id='u1e4v'><q id='u1e4v'></q></dir></style></legend>
                  <tfoot id='u1e4v'></tfoot>

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

                    2. <small id='u1e4v'></small><noframes id='u1e4v'>