Was möchtest du überhaupt erreichen?
Mit "w" erstellst du immer einen neue Datei. Und das möchtest du doch gerade nicht, oder?
Zitat aus man fopen:
Code:
w Truncate file to zero length or create text file for writing.
The stream is positioned at the beginning of the file.
Da ist es logisch das der symbolische Link danach nicht mehr existiert.
Um einen existierende Datei zu öffnen und etwas in sie zu schreiben, musst du fopen "a" als Option übergeben.
Code:
a Open for appending (writing at end of file). The file is cre-
ated if it does not exist. The stream is positioned at the end
of the file.
Dabei sollte eigentlich der symbolische Link dann nicht entfernt werden.
c ya,
Tobias
Lesezeichen