2

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!

Spencer
  • 19,732
  • 34
  • 83
  • 119
  • possible duplicate of [Run Java class file from PHP script on a website](http://stackoverflow.com/questions/2128619/run-java-class-file-from-php-script-on-a-website) – Wrikken Sep 20 '10 at 18:58

3 Answers3

3

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

NullUserException
  • 81,190
  • 27
  • 202
  • 228
  • And you can execute the java file directly without invoking a shell script to invoke the java. for example. – Chris Sep 20 '10 at 18:57
0

Using shell_exec you can invoke scripts and commands.

zengr
  • 37,540
  • 37
  • 125
  • 190
0

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

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

dkinzer
  • 30,533
  • 12
  • 64
  • 82