01.
<?php
02.
session_cache_limiter(
'nocache'
);
03.
session_start();
04.
?>
05.
<!DOCTYPE html>
06.
<html>
07.
<head>
08.
<meta charset=
"UTF-8"
>
09.
</head>
10.
<body>
11.
12.
<form>
13.
学籍番号 <input type=
"text"
name=
"r101"
>
14.
<input type=
"submit"
name=
"send"
value=
"送信"
>
15.
</form>
16.
17.
<pre>
18.
<?php
19.
20.
file_put_contents
(
"log/data_"
. session_id() .
".txt"
,
$_GET
[
"r101"
] );
21.
22.
print_r(
$_GET
);
23.
24.
?>
25.
</pre>
26.
27.
</body>
28.
</html>
★戻る> こんにちは世界-1.php session_id() の意味 session_id 関数 セッションは、現在使用しているブラウザ固有の処理を行う為、id を付けて管理しています。 ブラウザ側では、クッキーに登録されるので F12 のデベロッパーツールで参照できます![]()