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 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,''); 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 Link to comment https://forums.phpfreaks.com/topic/188511-text-file-help/#findComment-995895 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.