恢复误删除的文件

This commit is contained in:
2022-02-16 10:57:33 +08:00
parent 50db7e6aa4
commit a41649f8eb

64
html/config/location.php Normal file
View File

@ -0,0 +1,64 @@
<?php
$a=$_GET["p"];
if ($a==0)
{
echo "error";
return;
}
set_time_limit(0);
ob_end_clean();//清空(擦除)缓冲区并关闭输出缓冲
ob_implicit_flush(1);//将打开或关闭绝对(隐式)刷送。绝对(隐式)刷送将导致在每次输出调用后有一次刷送操作,以便不再需要对 flush() 的显式调用
//echo shell_exec("D:\\03MyGit\\linux\\movingliner\\cmake-build-debug-mingw\\movingliner.exe");
//$cmd = 'ping 127.0.0.1';
//sy""
system("sudo pkill movingliner");
Echo $a;
$cmd = 'sudo /home/pi/bin/movingliner '.$a;
while(@ ob_end_flush());
$proc = popen($cmd, 'r');
while(!feof($proc)){
echo fread($proc, 4096);
@ flush();
}
echo '<form action="/config/calibrate.php" method="get" target="_blank">';
echo '设备<input id="sensor" name="sensor" type="text" list="typelist" placeholder="请选择">
<datalist id="typelist">
  <option>IS1</option>
  <option>IS2</option>
  <option>ISIF</option>
  <option>OSIFAlpha</option>
<option>OSIFBeta</option>
</datalist>';
echo '尼特 <input type="number" name="nite" id="nite"/>';
echo '<input id="p" name="p" type="hidden" value="'.$a.'">';
echo '<input type="submit" value="定标">';
echo '</form>';
echo '<a href=/config/position.html>回到首页</a>';
/*
$i = 100;
while ($i<1000) {
++$i;
//部分浏览器需要内容达到一定长度了才输出
if ($i === 103) {
echo"<p>hello word".$i."</p>";;
} else {
echo"<p>hello word".$i."</p>";;
}
sleep(1);
}
*/