01.
<?php
02.
session_cache_limiter(
'nocache'
);
03.
session_start();
04.
?>
05.
<!DOCTYPE html>
06.
<html>
07.
<head>
08.
<meta content=
"width=device-width initial-scale=1.0 minimum-scale=1.0 maximum-scale=1.0 user-scalable=no"
name=
"viewport"
>
09.
<meta charset=
"UTF-8"
>
10.
<link rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css"
>
11.
</head>
12.
<body>
13.
14.
<form>
15.
学籍番号 <input type=
"text"
name=
"r101"
>
16.
<input type=
"submit"
name=
"send"
value=
"送信"
>
17.
</form>
18.
19.
<pre>
20.
<?php
21.
22.
$target
=
"log/data_"
. session_id() .
".txt"
;
23.
24.
file_put_contents
(
$target
,
$_GET
[
"r101"
] .
"\n"
, FILE_APPEND );
25.
26.
print
file_get_contents
(
$target
);
27.
28.
?>
29.
</pre>
30.
31.
</body>
32.
</html>