MrXander Posted October 1, 2007 Share Posted October 1, 2007 Hi there, I was wondering if anyone can point me in the right direction or maybe post an example of what I need? I need to be able to have a html file that I write to (which I know how to do), but I need it so that it keeps the previous information in the file, while the user adds more. Any suggestions? Link to comment https://forums.phpfreaks.com/topic/71385-solved-write-to-file/ Share on other sites More sharing options...
Orio Posted October 1, 2007 Share Posted October 1, 2007 <?php function add_to_file ($filename, $data_to_add) { file_put_contents($filename, file_get_contents($filename)."\n".$data_to_add); } ?> Orio. Link to comment https://forums.phpfreaks.com/topic/71385-solved-write-to-file/#findComment-359243 Share on other sites More sharing options...
MrXander Posted October 1, 2007 Author Share Posted October 1, 2007 Thanks Orio Link to comment https://forums.phpfreaks.com/topic/71385-solved-write-to-file/#findComment-359254 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.