开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜