08/09/26 16:27:22
<?php
$text = htmlspecialchars( $_POST["textbox"] );
if ( get_magic_quotes_gpc() ) {
$text = stripslashes( $text );
}
$filepath = "777.txt";
$string = "$text\n";
$fp = fopen($filepath, "w");
@fwrite( $fp, $string, strlen($string) );
readfile($filepath);
fclose($fp);
?>
<form action="<?= $_SERVER['PHP_SELF']; ?>" method="POST">
<input type="text" name="textbox" value="">
<input type="submit" value="書き込む">