Jump to content

PHP to view and modify source code


cmaier

Recommended Posts

Hi, i was looking for either a script that already exists... or possibly some ideas on how this would work.. but i want a scrip that will ask for a path to a file (from the root directory of my site).. then i want it to grab the source of that file and display it in a textbox where i can edit it and have the edited source saved over the original file. If this happens i will be perfectly happy, but if a "Make backup copy" check box could be added to save a copy of the original files source to something like [original_file_name].bk.php.

Thanks for any help
- cmaier
Link to comment
Share on other sites

You should also note that such a thing would be a big security risk if you did not have some sort of user authentication system in place to keep just anyone from being able to edit your pages and make whatever changes they want or even capture sensitive information.
Link to comment
Share on other sites

[!--quoteo(post=353848:date=Mar 11 2006, 12:05 AM:name=txmedic03)--][div class=\'quotetop\']QUOTE(txmedic03 @ Mar 11 2006, 12:05 AM) [snapback]353848[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You should also note that such a thing would be a big security risk if you did not have some sort of user authentication system in place to keep just anyone from being able to edit your pages and make whatever changes they want or even capture sensitive information.
[/quote]

Yeah, i have a admin section that i have locked down so only i can access it
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.