about summary refs log tree commit diff
path: root/sourcecodes/execute_bn_gom.php
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-08-24 14:26:00 -0500
committerFrederick Muriuki Muriithi2026-08-24 14:26:00 -0500
commita08f24c69d35f3e82291fa4051f787964ec7bc9c (patch)
treeb1b16bc2e6d7f0d5a869282db4942710354424e6 /sourcecodes/execute_bn_gom.php
parentd1e617f31c2ed2900845b7ea806ab5ee647d4de0 (diff)
downloadBNW-a08f24c69d35f3e82291fa4051f787964ec7bc9c.tar.gz
Use new `runTerminalCommand()` wrapper to run commands.
Diffstat (limited to 'sourcecodes/execute_bn_gom.php')
-rw-r--r--sourcecodes/execute_bn_gom.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/sourcecodes/execute_bn_gom.php b/sourcecodes/execute_bn_gom.php
index 93d46309..920c3747 100644
--- a/sourcecodes/execute_bn_gom.php
+++ b/sourcecodes/execute_bn_gom.php
@@ -1,6 +1,8 @@
 
 <?php 
 include("input_validate.php");
+require("terminal_commands.php");
+
 $keyval=valid_keyval($_GET["My_key"]);
 
 //////////////execute c codes for local score///////////////////
@@ -25,10 +27,7 @@ $thr=file_get_contents("$thrfile");
 //$thr=valid_input($thr);
 $thr=trim($thr);
 
-
-//$cmd="./run.sh $keyval $maxp $maxk";
-//system($cmd);
-shell_exec('./run.sh '.$keyval.' '.$maxp.' '.$maxk.' '.$thr);
+runTerminalCommand([realpath(__DIR__).'/run.sh', $keyval, $maxp, $maxk, $thr]);
 
 /////////////////////////////////structure matrix//////////////////////////////////////////////////////////
 
@@ -93,7 +92,7 @@ if ($fout !== false) {
 }
 
 
-shell_exec('./run_scripts/run_octave '.$keyval);
+runTerminalCommand([realpath(__DIR__.'/run_scripts/run_octave'), $keyval]);
 
 ?>
 <script>