PHP Not waiting for script to finish.
Posted: Sat Dec 05, 2009 7:12 pm
Hello. I'm trying to write a simple php frontend for a jython program. Here is the php file:
<?php
$cmd = 'jython interactiveNER.py';
$html = `$cmd`;
echo $html;
?>
The problem is that the jython script takes about ten seconds to run and the php script isn't waiting for it to finish and simply returns a blank page.
I've verified that the command I'm giving it runs from the shell. What do I need to do to get php to wait?
Thanks,
Joshua.
<?php
$cmd = 'jython interactiveNER.py';
$html = `$cmd`;
echo $html;
?>
The problem is that the jython script takes about ten seconds to run and the php script isn't waiting for it to finish and simply returns a blank page.
I've verified that the command I'm giving it runs from the shell. What do I need to do to get php to wait?
Thanks,
Joshua.