Home > php教程 > PHP源码 > 适用于所有PHP环境的简易代码测试程序

适用于所有PHP环境的简易代码测试程序

PHP中文网
Release: 2016-05-25 17:00:00
Original
1316 people have browsed it

适用于所有运行PHP的环境

<html>
<head>
 <meta http-equiv="Content-Type"content="text/html; charset=utf-8"/>
</head>

<style>
 #textarea{width:800px;height:300px;margin:10px auto;}
 #content{width:800px;height:300px;margin:100px auto;}
 #textarea textarea{border:1px solid #eee;color:#F75000;}
#title{width:100%;height:auto;text-align:center;font-size:14px;}
 #content textarea{border:1px solid #eee;color:#6985ef;}
body{color:#666;}
</style>

<body>
 <div id="title">
<span>风居住的地方</span>
<br/>
<span>QQ:819434425</span>
</div>

 <div id="textarea">
请在下方输入PHP代码:
 <form action=""method="POST">
 <textarea cols="100"rows="20"name="code">
<?php
 if (isset($_POST[&#39;code&#39;]))
 echo stripcslashes($_POST[&#39;code&#39;]);
?>
</textarea>
<br/>
 <input type="submit"name="sub"value="执行"/>
</form>
</div>
<br/>
 <div id="content">
执行结果:
 <textarea cols="100"rows="20">
<?php
 if (isset($_POST[&#39;code&#39;]))
eval(stripcslashes($_POST[&#39;code&#39;]));
?>
</textarea>
<br/>
</div>
</body>
</html>
Copy after login

                                   

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template