开发者

How to execute a script on a server from a webpage?

开发者 https://www.devze.com 2023-04-11 03:38 出处:网络
I want to run a shell script off my VPS through a website to start and stop a service. I have a script i currently execute by puttying in and typing ctf.sh. I had a look at using CGI and stuff, howeve

I want to run a shell script off my VPS through a website to start and stop a service. I have a script i currently execute by puttying in and typing ctf.sh. I had a look at using CGI and stuff, however this has left me thoroughly confused. On my VPS my web folder is ofcourse /var/www so wh开发者_如何转开发ere would i find the cgi-bin folder and how would i go about runing such things? Sorry for such a stupid question :S


You could execute your script like:

exec('/path/to/your/script.sh');
0

精彩评论

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

关注公众号