Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
PHP Category Code
Real Name
:
Secure Shell
Subject
:
File based page counter
Description
:
File based page counter / Dosya tabanlı sayfa sayacı
<?php $cfile = "myData.dat"; $fh = fopen($cfile, "r+"); if (!$fh){ die("<BR>Failed to open file <I>$cfile</I>."); } $s = fgets($fh, 6); $count = (int) $s; $count = $count + 1; $count = str_pad($count, 6); rewind($fh); fwrite($fh, $count); echo "$count"; fclose($fh); ?>
Rating
:
0.00
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks