Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Dec 2017
    Location
    Santa Clara, California, USA
    Posts
    70

    How to run a Bash script via PHP and match the output?

    How to run a Bash script via PHP and match the output?

  2. #2
    Senior Member
    Join Date
    Aug 2020
    Posts
    1,517
    You do it with exec ie:

    $exec = exec('/bin/sh /bin/scripts/myscript.sh ' , $output, $return);

    and you can see the output with:

    var_dump($output);

Posting Permissions

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

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.