Last active
December 19, 2015 23:39
-
-
Save parkjinwoo/6036189 to your computer and use it in GitHub Desktop.
simple note
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['text'])) { | |
$text = $_POST['text']; | |
$fo = fopen("./text.txt", "w") or die("can't open file"); | |
fwrite($fo, $text); | |
fclose($fo); | |
} | |
$fc = file_get_contents("./text.txt"); | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>simple note</title> | |
</head> | |
<body> | |
<form action="." method="POST"> | |
<p> | |
<textarea name="text" cols="64" rows="24"><?=$fc?></textarea><br /> | |
<input type="submit" /> | |
</p> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment