mike12255 Posted October 24, 2009 Share Posted October 24, 2009 I got changeable info on my website and I'm trying to create 3 backups on it using text files (don't ask about databaes please i want to use text files) so I trying to think of the best way to do this, 1) check if the file nameoffie1 or nameoffie2 or nameoffie3 exists 2) if any of them exists back them up to the next number and do nothing to the third if it exists what would be the best approach to do this? I'm leaving for work now so ill look at reply's when I get back, thanks. Link to comment https://forums.phpfreaks.com/topic/178863-solved-best-way-to-do-this/ Share on other sites More sharing options...
cags Posted October 24, 2009 Share Posted October 24, 2009 You can use the file_exists function to check whether a file exists. As far as creating backups, you will need to start at the end and work backwards otherwise when you copy 1 to 2, copying 2 to 3 will make file 3 the same as 1 was. Link to comment https://forums.phpfreaks.com/topic/178863-solved-best-way-to-do-this/#findComment-943638 Share on other sites More sharing options...
mike12255 Posted October 25, 2009 Author Share Posted October 25, 2009 ok thought so, just wasnt sure that was the most efficent way to do this Link to comment https://forums.phpfreaks.com/topic/178863-solved-best-way-to-do-this/#findComment-943769 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.