On my server python has to run in the wwwroot/cgi-bin folder, but php can run anywhere. My site is going to be written in python but I don?t want my user to see the url as mysite/cgi-bin/… .
So for example my homepage, index.php should contain a simple php script that will get my python page from the cgi-bin directory and display it.
However when I try to use SSI or fopen/file_get_contents/readlink and commands like these it just displays the python code. Where as when I visit the python page in my browser it runs it and displays the output for me.
My question is what php function can I use to execute my python page and return the output, not the code itself. (I think my hosting provider has disallowed certain powerful commands like system() etc. Does this make it impossible?).
As the very least can?t my php script pretend to be a www user and ?visit? the python page to read the output?
php function to read local python script output, not code