first commnit
This commit is contained in:
4
html/php/GetConfig.php
Normal file
4
html/php/GetConfig.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header("Content-type:application/json");
|
||||
$a=file_get_contents("/home/data/Setting/config.json");
|
||||
echo $a;
|
17
html/php/GetIniFile.php
Normal file
17
html/php/GetIniFile.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$a=parse_ini_file("/home/data/Setting/DeviceSettings.ini",true);
|
||||
|
||||
$numberofsensor=intval($a['DEVICE INFO']['TotalSpectrometer']);
|
||||
$b=array_values($a);
|
||||
|
||||
echo '<h2>设备信息</h2>';
|
||||
echo '设备数量 '.$numberofsensor.'';
|
||||
echo '<table>';
|
||||
for ($i=0;$i<$numberofsensor;$i++)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$b[$i+1]['Model'].'_定标文件主名称'.'</td>';
|
||||
echo '<td><input type="text" id="'.$b[$i+1]['Model'].'_CaliFileMainName'.'" name="'.$b[$i+1]['Model'].'_CaliFileMainName'.'"></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
10
html/php/GetSata.php
Normal file
10
html/php/GetSata.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
exec("ps -ef | grep TowerOptoSifAndSpectral | grep -v grep",$output,$return);
|
||||
//var_dump( $output);
|
||||
if ( count($output)>0)
|
||||
{
|
||||
echo '<div style="width: 40px;height: 20px;background: green"></div>';
|
||||
}else{
|
||||
echo '<div style="width: 40px;height: 20px;background: red"></div>';
|
||||
}
|
1
html/php/config.json
Normal file
1
html/php/config.json
Normal file
@ -0,0 +1 @@
|
||||
{"BeginTime":"","IntervalTime":"","EndTime":"","Dev_SN":"1000000","Location":"","GPS_Longtitude":"","GPS_Latitude":"","GPS_Atitude":"","InstallTime":"","ISIFCalibrationTime":"","IS1CalibrationTime":"","NameOfMaintenance":"","PhoneOfMaintenance":"","DownloadUserID":"","DownlaodAddress":""}
|
7
html/php/config.php
Normal file
7
html/php/config.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
var_dump($_POST);
|
||||
exec("sudo touch /home/data/Setting/config.json");
|
||||
exec("sudo chmod 777 /home/data/Setting/config.json");
|
||||
file_put_contents("/home/data/Setting/config.json",json_encode($_POST));
|
||||
echo "提交成功";
|
8
html/php/reboot.php
Normal file
8
html/php/reboot.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(0);
|
||||
echo system("sudo killall Mywathdog.sh");
|
||||
echo system("sudo killall TowerOptoSifAndSpectral");
|
||||
echo system("sudo ./reboot.sh &");
|
||||
echo "系统已重启";
|
||||
//var_dump($output);
|
3
html/php/reboot.sh
Normal file
3
html/php/reboot.sh
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
/root/Mywathdog.sh>>log.txt &
|
||||
|
Reference in New Issue
Block a user