...

View Full Version : Run .sh file from a web page



Kal
02-08-2006, 02:01 PM
Hi

Is it possible to run a .sh file for example ./go.sh located on a server, from a web page.

thanks in advance

raf
02-08-2006, 02:51 PM
... from a web page.
what do you mean by that? initiate it from the client? Then you're in the wrong forum.
If you mean to initaite it by the server, when a web-page is requested or processed, then have a look at http://www.php.net/manual/nl/ref.exec.php

Kal
02-08-2006, 03:12 PM
Well i have a .sh file situated on the server, which runs a series of scripts.

if i opened a terminal window and ran this script, it works fine.

but what i want to do is have a button on a web page which would run this script.

raf
02-09-2006, 08:08 AM
your button will need to be a submitbutton or an image with a link on, that posts to/requests a php-page. Inside that PHP page, you can then use exec() or so to run the .sh (check the link i posted for more info)

Kal
02-09-2006, 09:30 AM
thank. i'll try that now



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum