title: Integration between R and php
body: <p>I have a php script that sends 3 values ​​per parameter for a script R. </p>
  
  <pre><code>$typeOfData = 1;
  $month = 2;
  $year = 2014;
  
  exec("Rscript C:/xampp/R-script/plot.R $typeOfData $month $year", $response);
  
  var_dump($response);
  </code></pre>
  
  <p>And a R script that receives these parameters. </p>
  
  <pre><code>library(rjson)
  
  args &lt;- commandArgs(TRUE)
  tmp &lt;- strsplit(args, " ")
  typeOfData &lt;- tmp[[1]][1]
  month &lt;- tmp[[2]][1]
  year &lt;- tmp[[3]][1]
  
  output &lt;- list(imgname="imgs/tmax.tiff")
  cat(toJSON(output))
  </code></pre>
  
  <p>When I run the php script the variable $ response does not display the json generated by R, it returns me an empty set. Is there any other way to integrate R and PHP. </p>