摘要: <?php/**打印乘法口绝表*/echo"九灵九乘法口绝表<br><br><br>";echo"<table>";for($i=1;$i<=9;$i++){echo"<tr>";for($j=1;$j<=$i;$j++){echo"<td>".$j."*".$i."=".($j*$i)."</td>";}echo"</tr>&quo 阅读全文
posted @ 2011-07-14 06:37 同城中人 阅读(351) 评论(0) 推荐(0)
摘要: <?php/**简单的函数*/functionfontBold($con){return"<B>$con</B>";}$str="简单的函数测试!";echo"普通文本:$str<br>";echo"加粗文本:".fontBold($str)."";/**带可选参数的函数*/functionfontColor($con,$color="bule"){return"<fontcolor=\"$color\&qu 阅读全文
posted @ 2011-07-14 06:35 同城中人 阅读(219) 评论(0) 推荐(0)
摘要: <?php//打开文件$fp=fopen('tmp.html','r');//读取文件内容 可以用以下两个函数进行操作fread,file_get_contents$str=fread($fp,filesize('tmp.html'));//filesize为获取文件大小$content=file_get_contents('tmp.html'); //读取一行 $line=fgets($fp);直到遇到换行符 //写文件$news=fopen('news.html','w');fwrite( 阅读全文
posted @ 2011-07-14 06:33 同城中人 阅读(187) 评论(0) 推荐(0)