views:

70

answers:

3

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!

+2  A: 

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

NullUserException
And you can execute the java file directly without invoking a shell script to invoke the java. <?php exec('java -Xmx1024m -jar "/home/blahblahblah/mydomain/testjava/Test.jar"'); ?> for example.
Chris
A: 

Using shell_exec you can invoke scripts and commands.

zengr
A: 

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

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

DKinzer