/*
post.html
*/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>新建网页</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="description" content="布尔教育 http://www.itbool.com" /></head> <body> <form action="hello.php" method="post"> <p>留言<input type="text" name="title"/></p> <p><textarea name="content" id="" cols="30" rows="10"></textarea></p> <p><input type="submit" value="提交"/></p> </form> 快捷键 //form>p>text按TAB ctrl+l选择整行 ctrl+d选择整个单词 </body></html>/*
hello.php
*/
<?php
/****布尔教育 高端PHP培训培 训: http://www.itbool.com论 坛: http://www.zixue.it****/$str=$_POST['title'].",".$_POST['content']."\n";$fp=fopen('./msg.txt', 'a');fwrite($fp, $str);fclose($fp);echo("ok");?>