Jump to content

Recommended Posts

Use:

print_r($output):

 

Now the output is:

Array ( [0] => [1] => D:\XAMPP\xampp\htdocs>echo a [2] => a [3] => [4] => D:\XAMPP\xampp\htdocs>echo b [5] => b [6] => [7] => D:\XAMPP\xampp\htdocs>pause [8] => Jatka painamalla mit„ tahansa n„pp„int„ . . . ) 

I now wan't to get the output out of a jar file insted of a batch file.

 

I use the code:

<?php
exec('java -jar D:\test\server.jar', $result);
print $result;
?>

 

When i load the script, it opens the jar file, but the page keeps loading.

Then when I close the jar file, the script stop loading and displays "Array".

 

I would want to get the output of the jar as long as its open.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.