Hello everyone,
I am bothering again with a weird question again. Earlier I tried to verify digital signature of pdf/doc file. As I saw, it is wise to do it with java application, i made a jar file for this purpose. Now what i need to do, call the jar file with a input (path of the file) and get the output. I could not take input but I could get output. The code is like:
$ac = Yii::app()->basePath;
exec(‘java -jar ‘.$ac.’\\…\\jar\\VerifyPdf6.jar’, $output);
echo "<pre>";
print_r($output);
echo "<pre>";
echo "</br>";
Now,this works and I get the output from $output. Now I want to take an input and pass the value in the jar ‘VerifyPdf.jar’. that value will be used in the file parameter. Now, many people suggested to pass a value along with execution (exec) and get the value in java using request.getParameter(). But, in java application, the function was not recognized and i think it is mainly used in java servlet and jsp but I am not so sure. Can anyone help me with this ?
The code I am working to test now is :
$arg1 = "This is test from the php";
exec(‘java -jar Testphp2java.jar arg1’, $output);
echo "<pre>";
print_r($output);
echo "</pre>";
here, I want to take the $arg1 and print it from java ($output)…
Thank you very much for reading this. Any feedback will be big help for this newbie.