nakoniec som to dal takto a chyba nevyskakuje
Počet prehratí:
<?php
$currentFile = $_SERVER["PHP_SELF"];
$parts = Explode('/', $currentFile);
echo $parts[count($parts) - 1];
$currentFile = substr($string, 0, -3);
$currentFile = '.txt';
$soubor = $currentFile;
if(file_exists($soubor)){
print "";
}else{
$file=fopen($soubor,"a");
fputs($file,"0");
fclose($file);
}
$soubor=$soubor;
$file=fopen($soubor,"r+");
$pocet=fgets($file,100);
$pocet++;
fseek($file,0);
fputs($file,$pocet);
fclose($file);
echo $pocet
?>
avšak teraz mi ne stránke píšePočet prehratí: cheryl.html3
tú trojka bola najprv 2 a ešte predtým 1 :/