<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sitesnippet SYSTEM "sitesnippet.dtd">
<!--Adobe GoLive snippet file-->
<snippet version="1.0" title="页面计数器" type="HTML" author="Transmit Media for Adobe Systems, Inc." description="计数并显示页面访问者数量的脚本。">
	<markupsource>
		<![CDATA[
		<?php 
			//Must include empty text file named "count.dat" with read/write permission
			//path to "count.dat" file  
			$counter_file = "count.dat";
	    		if(!($fp = fopen($counter_file, "r"))) die ("Cannot open $counter_file.");
	   			$counter = (int) fread($fp, 20);
	    		fclose($fp);
	    		$counter++;
			//text to display with page counter
			echo "Total Visitors = ";
        	    echo "$counter";
         	   	$fp = fopen($counter_file, "w");
	    		fwrite($fp, $counter);
	    		fclose($fp);
		?>
		]]>
	</markupsource>
</snippet>