我想知道如何讓用戶在textarea內輸入一些文本,然後當他按下保存按鈕時,他鍵入的文本保存在文件內部是我的代碼:如何將文本從textarea發送到文件
<?php
header("location: add/Project.html");
$handle = fopen("Project.html", "a");
foreach($_POST as $value) {
fwrite($handle, $value);
}
fclose($handle);
exit;
?>
此代碼的作品,但與<input>
例如只在這裏是我的html代碼:
<form action="add.php" method="post">
<textarea type="text" name="code" id="code" value="" ></textarea>
<input type="text" name="code" id="code" value="" /><input value="Submit" tabindex="4" type="submit" >
</form>
它都只輸出記在<input>
文字你能幫助我請!
謝謝!這是我很蠢的一個小問題。 – user00239123
這不是愚蠢的;即使經過多年,我們都會犯明顯的錯誤。 –