I am new to php and have some experience with R opencpu.
Suppose I use localhost (127.0.0.1) to host my opencpu with the (default) port of 8004. Then, I cannot run the Apache using the same port. Instead, I have to run it in another port, say 8080. Then all my .php will be held on a server of the port 8080.
So how can I connect my .php files when running a opencpu app?
I thought that I could put my .php files in inst/www
, where my index.html
is. However, when I do so and open the page of http://localhost/ocpu/library/.../www/xxx.php
, my browser automatically downloads the .php file but not executing it.