<?php if($_POST['submit']){ $txt = '①框'.$_POST['1'].'\n②框'.$_POST['2'].'\n'; file_put_contents('1.txt',$txt,FILE_APPEND); } ?> <form action='' method='POST'><input type = 'text' name ='1' placeholder ='①框'><br /><input type = 'text' name ='2' placeholder ='②框'><input type = 'submit' name ='submit' value='提交'></form>