Quantcast
Channel: How to execute shell commands synchronously in PHP - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Daniel Lopes for How to execute shell commands synchronously in PHP

$
0
0

Check out the exec function syntax on php.net.You will see that exec does not run anything asynchronously by default.

exec has two other parameters. The third one, return_var can give you a hint if the script ran successfully or any exception was fired. You can use that variable to check if you can run the succeeding scripts.

Test it and let us know if it works for you.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>