Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Kal
    Kal is offline
    Regular Coder
    Join Date
    Dec 2005
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run .sh file from a web page

    Hi

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

    thanks in advance

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Kal

    ... 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
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    Kal
    Kal is offline
    Regular Coder
    Join Date
    Dec 2005
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run .sh file from a web page

    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.

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #5
    Kal
    Kal is offline
    Regular Coder
    Join Date
    Dec 2005
    Posts
    309
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank. i'll try that now


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •