Home > Article > Backend Development > 怎么保存数据到文档里
如何保存数据到文档里
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?PHP if($_POST) { $value1=$_POST['radio1']; $value2=$_POST['radio2']; $value3=$_POST['radio3']; $value4=$_POST['radio4']; $value5=$_POST['radio5']; $value6=$_POST['radio6']; $value7=$_POST['radio7']; $value8=$_POST['radio8']; } ?>
$contents = ''; $value1 = $_POST['radio1']; $value2 = $_POST['radio2']; $value3 = $_POST['radio3']; $value4 = $_POST['radio4']; $value5 = $_POST['radio5']; $value6 = $_POST['radio6']; $value7 = $_POST['radio7']; $value8 = $_POST['radio8']; $contents.="value1:{$value1}\t value2:{$value2} \t value3:{$value3}\t value4:{$value4}\t value5:{$value5}\t value6:{$value6}\t value1:{$value1}\t value1:{$value1}\t"; $handle = fopen('aa.txt',"w+"); fwrite($handle,$contents); fclose($handle); echo "文件写入成功"; <br><font color="#e78608">------解决方案--------------------</font><br>基础文件操作问题,lz还是多看看书吧..... <div class="clear"> </div>