PHP在线运行
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了PHP在线运行,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1374字,纯文字阅读大概需要2分钟。
内容图文
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>1920<tr>2122<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>2627<td valign="top"><iframe id="run_iframe" name="run_iframe" src="./run1.php" height="600px"></iframe></td>2829</tr>30</table>31</body>32</html>
run.php
1 <?php 2$code = stripslashes($_POST[‘php_code‘]); 3 4if(!strstr($code,‘<?php‘)) 5$code = ‘<?php‘.PHP_EOL.$code ; 6 7file_put_contents(‘run1.php‘,$code); 8 9header("Location:./run1.php"); 10 ?>
run1.php(自己创建)
源码:https://files.cnblogs.com/files/cyhms/i.zip
原文:https://www.cnblogs.com/cyhms/p/14775609.html
内容总结
以上是互联网集市为您收集整理的PHP在线运行全部内容,希望文章能够帮你解决PHP在线运行所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。