intenseone345 Posted January 14, 2010 Share Posted January 14, 2010 Hello, would anyone know the php command to clear or delete the whole contents of a text file, not just a single line but all the contents? thanks Quote Link to comment https://forums.phpfreaks.com/topic/188511-text-file-help/ Share on other sites More sharing options...
laffin Posted January 14, 2010 Share Posted January 14, 2010 file_put_contents($filename,''); Quote Link to comment https://forums.phpfreaks.com/topic/188511-text-file-help/#findComment-995236 Share on other sites More sharing options...
intenseone345 Posted January 16, 2010 Author Share Posted January 16, 2010 worked like a charm, thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/188511-text-file-help/#findComment-995895 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.