|
谢谢您访问本网页,您是第
$file = "intro/counter.txt";
//File name
if( ! file_exists( "$file" ) ) {
touch( "$file" );
chmod("$file",0777);
$fp=fopen("$file","r+");
fseek($fp,0);
$compteur = 0;
fputs($fp,$compteur);
}
if( is_readable( "$file") and is_writable( "$file") ) {
$fp=fopen("$file","r+");
$compteur=fgets($fp,9999);
fseek($fp,0);
$compteur++;
fputs($fp,$compteur);
fclose($fp);
print $compteur;
} else {
chmod("$file",0777);
}
?>
位客人! |