Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Here is a simple counter for your index.php home page using a counter.txt file to keep the numbers.Code: Select all
<?
if (file_exists('count_file.txt'))
{
$fil = fopen('count_file.txt',r);
$dat = fread($fil, filesize('count_file.txt'));
echo $dat+1;
fclose($fil);
$fil = fopen('count_file.txt',w);
fwrite($fil, $dat+1);
}
else
{
$fil = fopen('count_file.txt',w);
fwrite($fil, 1);
echo "1";
fclose($fil);
}
?>Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]