Skip to content

Instantly share code, notes, and snippets.

@uzulla
Last active August 29, 2015 14:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uzulla/3e6516240c1040305370 to your computer and use it in GitHub Desktop.
Save uzulla/3e6516240c1040305370 to your computer and use it in GitHub Desktop.
短い掲示板
<form method="post">
<input name="text">
<input type="submit">
</form>
<?php
!empty($_POST["text"]) && file_put_contents("log.php", date("c>").htmlspecialchars($_POST["text"], ENT_QUOTES, "UTF-8")."\n", FILE_APPEND) && header("location: {$_SERVER['REQUEST_URI']}");
echo @implode('<br>',array_reverse(file("log.php")));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment