I have a little problem with the following,
i made the following script php script to execute a python file on my server and parse a variable to it.. but somehow the var never ends up to python
<?php
if ($_POST) {
import_request_variables('p', 'p_');
$net = $_POST['net'];
$result = exec("/usr/bin/python st/st.py $net &> st/pylog.txt");
echo $result;
$myFile = "st/pylog.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
}
?>
<form action="" method="post">
NET: <input type="text" name="net" />
<input type="submit" value="submit!" />
</form>
Can someone tell me what i'm doing wrong?
Thanks in advance