PHP command shell_exec() not working for my custom Java app5

前端 未结 1 856
难免孤独
难免孤独 2021-01-15 18:31

I have made a custom java program to output a license and am trying to run it in php.

$deviceid=\"12345\";
$command_app = \'java -jar /home/myname/secure/myc         


        
1条回答
  •  粉色の甜心
    2021-01-15 19:04

    My first instinct is that the command java is not in PHP's shell path. Try something like this:

    $command_app = '`which java` -jar /home/myname/secure/mycommand.jar ';
    

    The command which java will return the full path to the java executable...

    0 讨论(0)
提交回复
热议问题