<?php

	$fileLines=file("data.txt"); 
	echo count($fileLines); 

	$myFile = "titi.txt";
	$fh = fopen($myFile, 'w') or die("can't open file");

	
	$val="fgr";

	$chaine = "Floppy Jalopy" ." " .$val ."\r\n" ."beau garcon" ." " .$val ."\r\n" ."gros con" ." " .$val;

	fwrite($fh, $chaine);
	fclose($fh);





$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Floppy Jalopy\n";
fwrite($fh, $stringData);
$stringData = "Pointy Pinto\n";
fwrite($fh, $stringData);
fclose($fh);


$F = fopen("chemin_du_fichier.txt","w");
for($i=0;$i<10;$i++)
{
    fputs($F,"goudi\r\n");
}
fclose($F);


 $inF = fopen("ip.ini", "a" );
 $userip = getenv("REMOTE_ADDR" );
 $mois = array('', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
 $date_1 = date("j" ) ;
 $date_2 = $mois[date('n')];
 $date_3 = date("Y" );
 $date_4 = date("H:i" );
 $date = "$date_1 $date_2 $date_3 à $date_4";
 fputs($inF, "[" );
 fputs($inF, $date);
 fputs($inF, "=|" );
 fputs($inF, $userip);
 fputs($inF, "|" );
 fputs($inF, "]" );
 fclose($inF);
?>
