四个参数值取自数据库。 python脚本具有基于指定的四个参数进行重新计划的算法。
<?php
include('main.php');
$lat = $_POST['lt'];
$lon = $_POST['ln'];
$uid = $_POST['id'];
$rad = $_POST['rd'];
#$lat = "28.674558";
#$lon = "77.274202";``
#$uid = "1";
#$rad = "1";
$outs = 'python recommend.py' . $uid . ' ' . $lat . ' ' . $lon . ' ' . $rad;
$output = shell_exec($outs);
echo $output;
?>
答案 0 :(得分:0)
在conc.ating $outs
<?php
include('main.php');
$lat = $_POST['lt'];
$lon = $_POST['ln'];
$uid = $_POST['id'];
$rad = $_POST['rd'];
#$lat = "28.674558";
#$lon = "77.274202";``
#$uid = "1";
#$rad = "1";
$outs = 'python recommend.py ' . $uid . ' ' . $lat . ' ' . $lon . ' ' . $rad;
$output = shell_exec($outs);
echo $output;
?>