开发者

javascript code to edit&save file on linux server?

is there any javascript code that I can use to edit (and maybe download and later upload the modified) text file on a linux server?

So I do not have to leave my web browser and do ssh all the time when I need开发者_运维百科 to edit or even only check some config files? The server is not accessible from the Internet.


You can use AJAX to read the file, then use more AJAX to call a server-side script that writes to the file, preferably without introducing a security hole.


file_get_contents() put in to textarea, edit, save with file_put_contents(), no js needed just a form and php. if you want fancy editing like for html then there's CKEditor or tinymce.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜