no save
Assistance
Achat
News

Forum | webmastering
PHP Ecrire dans un fichier texte
others1, le sam. 20 juin 2009 à 12:51:45
Bonjour à tous,

J'ai un petit problème tout bête, voici mon code:
<?php

/*Fichier texte8.txt contient 2 lignes (aléatoire):
('aaaaaa', 'bbbbbbbb');
('cccccccc'), 'd');
*/


$monfichier = fopen('texte8.txt', 'r+');
for ($i=0;$i<2;$i++)
{

$pages_vues = fgets($monfichier);
fputs($monfichier, "1".$pages_vues);
}



/* Je souhaite avoir à la fin dans mon fichier texte8.txt:
1('aaaaaa', 'bbbbbbbb');
1('cccccccc'), 'd');
*/



fclose($monfichier);

?>


Je souhaite ajouter à l intérieur de mon fichier texte une caractère devant chaque ligne, mais je n'y arrive pas. Pouvez-vous m'aider SVP.

MerciConfiguration: Windows Vista
Firefox 3.0.11


benvii
20 juin
Suivant
REPONSES
benvii
20 juin
others1
20 juin
others1
20 juin
benvii
22 juin
Version Web
Réalisé par RedShift
no save