Entering edit mode
Fahim Md
▴
250
@fahim-md-4018
Last seen 10.4 years ago
Hi
I am trying to give user interface to my tool and willing to call R
from
php. I am able to install, configure and run the example given on
rapache manual website http://rapache.net/manual.html and I suppose it
is
working perfect.
I have a couple of varibles in php (such as input file path and other
variables) that I want to send to R. The manual mentions how to call
an R
file but I could not figure out how to pass arguments from php (post
variables) to an R file or R functions.
# test.php file
#R file to be called (Filename: test.R): Function name is foo.
foo ( $var1, $var2, $geneArray, $inpFile) ) // How to receive the
variable.
#http.conf file. //What to modify in this file
ServerName localhost
LoadModule R_module /usr/lib/apache2/modules/mod_R.so
ROutputErrors
<location rapachetest="">
SetHandler r-handler
RFileHandler /home/fahim/webRugit/hello.R
</location>
Do I need to modify any other file???
Thanks a lot.
Fahim
[[alternative HTML version deleted]]