Files
TowerOptoSifAndSpectral/html/config/location.php

65 lines
1.6 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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?p" method="get">';
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);
}
*/