-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.php
74 lines (56 loc) · 1.11 KB
/
run.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<html>
<head>
<style>
.left{
width:90%;
}
.right
{
width:30%;
height:300px;
float:right;
font: 10px verdana;
}
.result{
font: 12px arial;
width:100%;
background: lightgoldenrodyellow;
}
.input{
height: 300px;
width: 100%;
font: 20px verdana;
}
.submit{
text-align: center;
width: 300px;
height: 50px;
color: white;
background: green;
font-size: 40px;
border-radius: 15px;
}
</style>
</head>
<body>
<div class="left">
<form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" >
<textarea name="run" class="input"> <?php echo isset($_POST['run']) ? $_POST['run'] :''; ?> </textarea><br/>
<p style="text-align:center"> <input type="submit" class="submit" name="submit" value="Go" ></p>
</form>
</div>
</body>
</html>
<div>Result:<hr/> </div>
<div class="result" >
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
if(isset($_POST['submit'])){
$str = $_POST['run'];
echo eval($str);
}
?>
</div>