I am running a nginx web server, along with PHP-CGI.
I would like to know if it is possible to execute a Python script inside PHP pages, allowing both languages to b
exec will return the output of the shell command, but you still need to echo that to the page. The following code should work for you
exec
echo
<body> <p>Hello! Here is a message: <?php echo exec('python hello.py'); ?></p> </body>