1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| if(file_exists("$file"))
{
$fp=fopen("$file","r");
$contenu=fgets($fp,4096);
fclose($fp);
$contenu_array = explode(":",$contenu);
}
$info_hash = (string)$_GET['info_hash'];
$combien=count($contenu_array);
for ($i=0;$i<=$combien;$i++) {
echo $contenu_array[$i];
if ($info_hash==$contenu_array[$i])
{
//On efface la valeur hash du fichier user.txt
$new_modif=strtr($info_hash, "", $contenu); // <-------------------------------
$fp=fopen("$file","w+");
fwrite($fp,$new_modif);
fclose($fp); |
Partager