anonymous No title
No License PHP
2020年10月20日
Copy
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>課題5</title>
</head>
<body>
<form action = "kadai_1-5.php" method = "get">
  <input type = "text" name = "comment"><br>
  <input type = "submit" value = "送る">
  </form>
</body>
</html>
<?php
  if(isset($_GET["comment"])) {
  $comment = $_GET["comment"];
  echo $comment;
  }

  $fp = fopen("kadai_1-5.txt","w");
  fwrite($fp,"てすと");
  fclose($fp);

?>
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>課題5</title>
</head>
<body>
<form action = "kadai_1-5.php" method = "get">
  <input type = "text" name = "comment"><br>
  <input type = "submit" value = "送る">
  </form>
</body>
</html>
<?php
  if(isset($_GET["comment"])) {
  $comment = $_GET["comment"];
  echo $comment;
  }

  $fp = fopen("kadai_1-5.txt","w");
  fwrite($fp,"てすと");
  fclose($fp);

?>

Output

Run
年末年始は機械学習・深層学習を勉強しませんか?
No one still commented. Please first comment.
年末年始は機械学習・深層学習を勉強しませんか?
広告
未経験から最短でエンジニアへの転職を目指すなら