1

I have been trying to run this PHP script. There is no output whatsoever and I cannot seem to understand the reason.

<?php

echo "Example DOI Query <be>";

$doi = someDOIvalue;

echo 'DOI: '.$doi.'<br>';

$query = 'curl -LH "Accept: application/json" http://doi.org/';

$cmd = $query.$doi." | jq '.title'";

echo $cmd;

$title = shell_exec($cmd);

echo 'Title:<br>'.$title;

?>

However, when I try to use the same command on my LINUX command line (as below), it works perfectly fine.

curl -LH "Accept: application/json" http://doi.org/10.1016/someDOIvalue | jq '.title' 

Any idea what I'm doing wrong?

ohMMM
  • 11
  • 1

1 Answers1

-2

there are a lot of reasons for this issue try to check

the group and the permission also use the full path of the command

I hope it's help full

Ahmed Hassan
  • 579
  • 2
  • 6