Not talking about security, one simple way is that you can read the php file using reading functions like file_get_contents and once you have the contents, you should show them in some textarea where your users could edit it. Once they edit it and submit the form, you should update the info.