For example, I have a file python
work1.py
from time import sleep
while True:
print "Send 1"
sleep(2)
print "Send 2"
sleep(2)
And i have a file php to run file python via shell_exec function
<?php
$result=shell_exec("sudo python work1.py");
echo $result;
?>
But when i run, nothing display. So what's problem? Please help me. Thanks.