使用PHP怎么实现一个在线调试执行功能

  介绍

本篇文章给大家分享的是有关使用PHP怎么实现一个在线调试执行功能,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。

运行。php文件如下:

& lt; ! DOCTYPE  html  PUBLIC “-//W3C//DTD  XHTML  1.0,过渡//EN"   “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"比;   & lt; html  xmlns=癶ttp://www.w3.org/1999/xhtml"比;   & lt; head>   & lt; meta  http-equiv=癈ontent-Type",内容=皌ext/html;, charset=utf-8",/比;   & lt; title>调试php代码& lt;/title>   & lt;/head>   & lt; style>   ,iframe {, min-width: 600 px;}   ,textarea {, max-height: 600 px}   ,表{,保证金:0,汽车;}   & lt;/style>   & lt; body>   & lt; table 边界=?”,宽度=?00 px"比;   & lt; tr>   & lt; th> PHP 代码调试& lt;/th>   & lt; th> & lt;/th>   & lt; th> & lt;/th>   & lt;/tr>   & lt; tr>   & lt; form  action=啊?run2.php",目标=皉un_iframe",方法=皃ost"比;   & lt; td  valign=皌op",对齐=癱enter"比;   & lt; textarea  name=皃hp_code",关口=?0”,行=?3”;在php & lt; ?   echo  file_get_contents (& # 39;。/run3.php& # 39;);   祝辞;& lt;/textarea>   & lt;/td>   & lt; td  valign=癿iddle"祝辞& lt; button 类型=皊ubmit",在执行& lt;/button> & lt;/td>   & lt;/form>   & lt; td  valign=皌op"祝辞& lt; iframe  id=皉un_iframe", name=皉un_iframe", src=https://www.yisu.com/zixun/薄?run3.php”高度=" 600 px ">         身体   

run2。php文件如下:

& lt; php ?   ,code 美元;=,stripslashes ($ _POST [& # 39; php_code& # 39;]);   ,如果(! strstr(代码,美元& # 39;& lt; ? php # 39;))   时间=美元才能code  & # 39; & lt; ? php # 39; .PHP_EOL code 美元;;   ,用file_put_contents (& # 39; run3.php& # 39;,美元代码);   ,头(“位置:/run3.php");

使用PHP怎么实现一个在线调试执行功能