1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| case "description":
$file = fopen("../tmp/derniersResultats.txt", "r") or die("<strong>Can not open file </strong>");
if ($file) {
$cmpt=0;
$empty="";
while (!feof($file)) {
$cmpt++; // j'ai besoin du nombre total d'ID
}
for ($cmpt = 0; $cmpt < 3; $cmpt++;){
$empty=$empty.fgets($file, 4096);
}
}
fclose($file);
$_SESSION['CMPT'] = $cmpt - 1;
if ($empty==""){
$_SESSION['ERROR'] = ('Your set is empty,<br> please type in an other request');
header("location:../pages/acceuil2.php") or die("Can not go to the home page");
}
else get_description("../tmp/derniersResultats.txt") or die("Can not go to the right path" );
break; |