Re: PHP zapis

From: CaRBO (carbo@gmx.co.uk)
Date: 21. 08. 2001, 20:03 CEST


Dna Tuesday 21 August 2001 19:02 si napisal/a:
> Prijemny vecer;
>
> Podreboval bych poradit se zdrojakem ktery by dokazal
> najit poseldni radek souboru a AZ ZA NEJ pripsat dalsi.
> Napriklad s promennou text.
> zkousel jsem tohle, ale nejak mi to nejde>>>
>
> If($od=="ano"):
> $cas = Date("j. " . "m. " . "Y,  " . "H:i:s") . "\n";
> $neco = "$cas ->$nick\n\n";
> $sp = FOpen ("user.dat", "r");
> $r= FPassThru($sp);
> $r .= "\n '$neco' \n";
> $sp = FOpen ("user.dat", "w");
> FWrite ($sp, $r);
> FClose ($sp);
> $od = "ne";
> endif;
>

$fp = fopen("user.dat","a");
fwrite($fp, "\ntext co chces pridat");
fclose($fp);

subor pred:
fsdfasdfdsfdasfdsa

po:
fsdfasdfdsfdasfdsa
text co chces pridat

-- 
You must realize that the computer has it in for you.  The irrefutable
proof of this is that the computer always does what you tell it to do.



This archive was generated by hypermail 2.1.2 : 04. 09. 2001, 09:49 CEST