Browse Source

2020-09-29 / ct_chen

Actions:
1. Webservice fix issue of function 'get button status'

Files:
1. EVSE/rootfs/var/www/get_button_action.php
ct_chen 4 years ago
parent
commit
da9d83d288
1 changed files with 1 additions and 12 deletions
  1. 1 12
      EVSE/rootfs/var/www/get_button_action.php

+ 1 - 12
EVSE/rootfs/var/www/get_button_action.php

@@ -10,7 +10,6 @@
 		create();
 	}
 
-	// 新建員工
 	function create() {
 		chdir("/root");
 		exec("'./WebService' 'button'",$output,$return_var);
@@ -24,16 +23,6 @@
 			echo "InitShareMemory Error";
 			exit;
 		}
-		$obj[1] = trim($output[0]);
-		$obj[2] = trim($output[1]);
-		$obj[3] = trim($output[2]);
-		$obj[4] = trim($output[3]);
-		$obj10 = json_decode(trim($output[0]));
-		$obj20 = json_decode(trim($output[1]));
-		$obj30 = json_decode(trim($output[2]));
-		$obj40 = json_decode(trim($output[3]));
-		$arr=array($obj10,$obj20,$obj30,$obj40);
-		$obj[0]=json_encode($arr);
-		echo $obj[$_REQUEST['opt']];
+		echo $output[0];
 	}
 ?>