Autor Beitrag
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 05.04.05 15:03 
Moin... ;)

Mal zuerst: Ich bin auf keinen Fall ein PHP-Profi! ;) Also bitte nicht ganz so arg draufhauen. ;)

Ich möchte einfach ein paar Parameter, die an das Script gegeben wurden, in eine Datei speichern. Hab mal gegoogelt und auch gefunden. Hab's erstmal ohne Parameter versucht und dann ist das da entstanden:
ausblenden PHP:
1:
2:
3:
4:
5:
6:
<?php
$logfile = fopen("./logfile.txt","w+");
$newcontent = "Hans";
fwrite($logfile, $newcontent);
fclose($logfile);
?>

Das funktioniert. Geh ich jetzt nochmal auf das Script, dann macht er mir in der Datei sowas:
ausblenden Text:
1:
HansHans					

Ich hätte aber gerne das da:
ausblenden Text:
1:
2:
Hans
Hans

Also versuch ich folgendes aus meinen printf-Zeiten:
ausblenden PHP:
1:
2:
3:
4:
5:
6:
<?php
$logfile = fopen("./logfile.txt","w+");
$newcontent = "Hans\n";
fwrite($logfile, $newcontent);
fclose($logfile);
?>

Geht nicht. Da steht dann auch nach dreimaligen Aufruf das da:
ausblenden Text:
1:
Hans					


Warum??? :shock:
WeBsPaCe Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 05.04.05 15:04 
Oh mein Gott bin ich blöd!! :lol:

:autsch: :autsch:

ausblenden PHP:
1:
2:
3:
4:
5:
6:
<?php
$logfile = fopen("./logfile.txt","a+");
$newcontent = "Hans\n";
fwrite($logfile, $newcontent);
fclose($logfile);
?>