i'm trying to add some html code to the top of a text file, without deleting the old contents...
i tried several ways to achieve this [ such as fopen($file , "r+") or fopen($file , "aw") ], but
either the text is not put on top of the file, some text is deleted or the old contents is completely deleted.
let's call the file code.txt, some old contents is in it, and the code "<b>code</b>" shall be added on top of the file. the code can be longer than one single line in an text editor.
i just don't know any other possibilities and where to search for...
thanks in advance!