Imad Posted September 17, 2008 Share Posted September 17, 2008 Hi guys, I have a settings.php file that I want to be able to update using a text form. However, when I update one setting within the file I want it to keep the other settings within the file and not remove everything in the file except for the setting I updated. How can I do so? Best Regards. Link to comment https://forums.phpfreaks.com/topic/124690-updating-a-file-help/ Share on other sites More sharing options...
GingerRobot Posted September 17, 2008 Share Posted September 17, 2008 Read the entire file into a string, update the particular value in that string, write the whole string back to the blank file. Link to comment https://forums.phpfreaks.com/topic/124690-updating-a-file-help/#findComment-644051 Share on other sites More sharing options...
Imad Posted September 17, 2008 Author Share Posted September 17, 2008 Read the entire file into a string, update the particular value in that string, write the whole string back to the blank file. That's what I was thinking of doing, or do something like hidden textbox fields that contains the information. But I thought maybe someone would have an easier way around it. Best Regards. Link to comment https://forums.phpfreaks.com/topic/124690-updating-a-file-help/#findComment-644071 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.