How to run a shell script in PHP?

老子叫甜甜 提交于 2020-01-04 21:38:07

问题


I am trying to trigger the running of a shell script using PHP. Essentially, when a user completes an action on our website programmed in PHP, we want to trigger a shell script which itself calls a Java file. Thanks in advance!


回答1:


See shell_exec(), exec() and other Program execution functions




回答2:


Using shell_exec you can invoke scripts and commands.




回答3:


use the exec() function to execute an external script or function:

http://us3.php.net/manual/en/function.exec.php



来源:https://stackoverflow.com/questions/3754538/how-to-run-a-shell-script-in-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!