-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
39 lines (36 loc) · 867 Bytes
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Editor</title>
<link href="editorCSS.css" rel="stylesheet" type="text/css"/>
<style type="text/css" media="screen">
body {
overflow: hidden;
}
</style>
</head>
<body>
<pre id="editor">
#include <stdio.h>
int main(){
}
</pre>
<script src="Ace/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.setTheme("ace/theme/eclipse");
editor.session.setMode("ace/mode/c_cpp");
var code=editor.getValue();
document.getElementById('editor').style.fontSize='22px';
editor.setShowPrintMargin(false);
</script>
<h1>
<?php
$code="<script>document.writeln(code);</script>";
echo $code;
?>
</h1>
</body>
</html>