Jump to content


Photo

PHP to view and modify source code


  • Please log in to reply
6 replies to this topic

#1 cmaier

cmaier
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 11 March 2006 - 02:02 AM

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

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 11 March 2006 - 02:08 AM

www.hotscripts.com probably has dozens, if not hundreds, of suitable scripts for free.
Legend has it that reading the manual never killed anyone.
My site

#3 cmaier

cmaier
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 11 March 2006 - 02:13 AM

Yes, true, but i don't know where to look on there.. under php there are sub-catagories... and no clue which it would be under... possibly a direct link to one?

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 11 March 2006 - 02:32 AM

file editor

[a href=\"http://www.hotscripts.com/Detailed/54648.html\" target=\"_blank\"]http://www.hotscripts.com/Detailed/54648.html[/a]
Legend has it that reading the manual never killed anyone.
My site

#5 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 11 March 2006 - 05:05 AM

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.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#6 cmaier

cmaier
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 12 March 2006 - 05:53 PM

[!--quoteo(post=353848:date=Mar 11 2006, 12:05 AM:name=txmedic03)--][div class=\'quotetop\']QUOTE(txmedic03 @ Mar 11 2006, 12:05 AM) View Post[/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

#7 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 12 March 2006 - 11:52 PM

Excellent, in that case, if you need any further help, let me know.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users