标签:files php 在线 代码 600px 调试 PHP 运行
index.html
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <title>调试php代码</title> 6 </head> 7 <style> 8 iframe{ min-width:600px;} 9 textarea{ max-height:600px} 10 table{ margin:0 auto;} 11 </style> 12 <body> 13 <table border="0" width="100px"> 14 <tr> 15 <th>PHP 代码调试</th> 16 <th></th> 17 <th></th> 18 </tr> 19 20 <tr> 21 22 <form action="./run.php" target="run_iframe" method="post"> 23 <td valign="top" align="center"><textarea name="php_code" cols="50" rows="43"><?php echo file_get_contents('./run1.php');?></textarea></td> 24 <td valign="middle"><button type="submit" style=" width:60px;">执行</button></td> 25 </form> 26 27 <td valign="top"><iframe id="run_iframe" name="run_iframe" src="./run1.php" height="600px"></iframe></td> 28 29 </tr> 30 </table> 31 </body> 32 </html>
run.php
1 <?php 2 $code = stripslashes($_POST['php_code']); 3 4 if(!strstr($code,'<?php')) 5 $code = '<?php'.PHP_EOL.$code ; 6 7 file_put_contents('run1.php',$code); 8 9 header("Location:./run1.php"); 10 ?>
run1.php(自己创建)
源码:https://files.cnblogs.com/files/cyhms/i.zip
标签:files,php,在线,代码,600px,调试,PHP,运行 来源: https://www.cnblogs.com/cyhms/p/14775609.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。