|
|
|
|
![]() ![]() |
Dec 17 2005, 12:54 PM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 4 Joined: 17-December 05 Member No.: 15,852 |
ok just copy this code to the location y
QUOTE <?php $file = 'counter.txt'; if(!file_exists($file)) { $handle = fopen($file, 'w'); fwrite($handle, 0); fclose($handle); } $count = file_get_contents($file); $count++; if(is_writable($file)) { $handle = fopen($file, 'w+'); fwrite($handle, $count); fclose($handle); } else { echo 'Could not increment the counter!<br />'; } echo number_format($count).' Hits'; ?> open notepad and save it as counter.txt then upload it to the director you put the code on the php page a set the permission to 777 when adding this code to you page make sure you save you page as name.php and not as name.htm or name.html or if you have php activation in html u can just save it as html im cant remember how to activate php in html if some one can tell me it will help |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 8th October 2008 - 05:55 AM |