Jump to content

Updating a file help


Imad

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.