this was my code
Code: Select all
<?php
$filename = "includes/fichier.txt";
$fp = fopen( $filename, "w" ) or die("$filename not found");
fwrite( $fp, "Hello world\n" );
fclose( $fp );
$fp = fopen( $filename, "a" ) or die("$filename not found");
fputs( $fp, "And another thing\n" );
fclose( $fp );
if (!$file = fopen("includes/fichier.txt","r")) {
echo "Can't open the $filename";
exit;
} else {
while(!feof($file)) {
$Ligne = fgets($file,50000);
echo $Ligne;
$Fichier .= $Ligne;
}
fclose($file);
}
?>Code: Select all
function write() {
$file = fopen("includes/clients.txt","a");
fputs($file, "\n");
fputs($file, $zip);
fclose($file);
}ps : i m not familiar with php at all...not yet
thx