回答編集履歴
1
ソースコード追記
test
CHANGED
@@ -1 +1,25 @@
|
|
1
|
+
```HTML
|
2
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
3
|
+
<div id="edit_area"></div>
|
4
|
+
<script>
|
5
|
+
var fn = function() {
|
6
|
+
$.ajax({
|
7
|
+
type: 'post',
|
1
|
-
|
8
|
+
url: "test6.php",
|
9
|
+
success: function(result){
|
10
|
+
document.getElementById('edit_area').innerHTML = result;
|
11
|
+
}
|
12
|
+
});
|
13
|
+
setTimeout(fn,10);
|
14
|
+
};
|
15
|
+
fn();
|
16
|
+
</script>
|
17
|
+
```
|
18
|
+
```PHP
|
19
|
+
<?php
|
20
|
+
$result = file_get_contents ("10.txt");
|
21
|
+
file_put_contents("10.txt", $result + 1);
|
22
|
+
echo $result;
|
23
|
+
exit;
|
24
|
+
?>
|
25
|
+
```
|