All pastes #473065 Raw Edit

shibby

public text v1 · immutable
·published 2007-05-06 00:38 UTC
rendered paste body
<?php
session_start();
$counter = ("count.txt");
$num = file($counter);

if (isset($_SESSION['count'])) {



	echo $num[0];
}
else
{
	$_SESSION['count'] = "True";
		$num[0]++;
		$fp = fopen($counter, "w");
		fputs($fp, "$num[0]");
		fclose($fp);
		echo $num[0];
		
}



?>