Posted in PHP onMarch 09, 2009
调用方法:
<script language = "javascript" src = "count.php"></script>
count.php源码:
<?php $file_name = "count.txt"; $fp = fopen($file_name,"r"); //打开文件读入当前计数 $count = fread($fp, filesize($file_name)); fclose($fp); $count++; //计数加1 $fp = fopen($file_name, "w"); //再次打开文件写入更新后的计数 fwrite($fp, $count); fclose($fp); echo "document.write('".$count."')"; //输出JavaScript代码,返回计数 ?>
隐性调用php程序的方法
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@