How to edit a file on website

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
qwer0
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Sep 30, 2019 6:38 pm

Mon Sep 30, 2019 6:43 pm

I want to edit a file on a website and be able to save it. Like the WordPress edit theme files thing. To clarify, There would be a text box on the webpage with the file and I would make changes to it, then submit it. Also how would I run a bash script after it is submitted?
chorn
php-forum GURU
php-forum GURU
Posts: 608
Joined: Fri Apr 01, 2016 2:18 am

Mon Sep 30, 2019 10:15 pm

You can use the file_get_contents and file_put_contents functions to handle files.

Also there's exec() and shell_exec()
Post Reply