分类:
2009-09-20 21:26:03
» » Intermediate
By
Create an IP-logging PHP Polling or Voting System in PHP 5.0
chinaunix网友2009-10-09 17:11:17
第一种:利用模板。目前PHP的模板可以说是很多了,有功能强大的smarty,还有简单易用的smarttemplate等。它们每一种模板,都有一个获取输出内容的函数。我们生成静态页面的方法,就是利用了这个函数。用这个方法的优点是,代码比较清晰,可读性好。 PHP代码举例: assign("title","Hello World!"); $content = $t->fetch("templates/index.htm"); //这里的 fetch() 就是获取输出内容的函数,现在$content变量里面,就是要显示的内容了 $fp = fopen("archives/2005/05/19/0001.html", "w"); fwrite($fp, $content); fclose($fp); ?> 第二种方法:利用ob系列的函数。这里用到的函数主要是 ob_start(), ob_end_flush(), ob_get_cont
chinaunix网友2009-10-07 15:05:38
这里的意思是 onclick 点击的时候 this.form 表示这个form action="" 就是设定提交的网址 submit() 表示提交表单 +---------------- 补充 -----------------------+
chinaunix网友2009-10-07 15:05:32
这里的意思是 onclick 点击的时候 this.form 表示这个form action="" 就是设定提交的网址 submit() 表示提交表单 +---------------- 补充 -----------------------+