Also Hallo erstmals
Ich hab hier mal ein Counter-script reingetan, welches auch prima funktioniert. Nun meine Bitte, könntet ihr mir diese Befehle erklären:
flock($fp, 1);
fseek($fp,0);
flock($fp, 3);
counter-script
Ich hab hier mal ein Counter-script reingetan, welches auch prima funktioniert. Nun meine Bitte, könntet ihr mir diese Befehle erklären:
flock($fp, 1);
fseek($fp,0);
flock($fp, 3);
counter-script
PHP:
<?php
$COUNT_FILE = "counter.txt";
if (file_exists($COUNT_FILE)) {
$fp = fopen("$COUNT_FILE", "r+");
flock($fp, 1);
$count = fgets($fp, 4096);
$count += 1;
fseek($fp,0);
fputs($fp, $count);
flock($fp, 3);
fclose($fp);
} else {
echo "Can't find file, check '\$file' var...<BR>";}
?>