How to append the file from TOP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

How to append the file from TOP

Post by eshban »

how i can APPEND(WRITE) at the top of the FILE by using fwrite function or any other.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You have to read the old contents, write the new contents at the beginning of the file and then append the old contents again.
Post Reply