Skip to content

Commit

Permalink
updating upload_file.php
Browse files Browse the repository at this point in the history
  • Loading branch information
VaibhavSri9637 committed Dec 6, 2017
1 parent 0a63839 commit a77af2d
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions Hasura/upload_file.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,32 @@
fclose($myfile);
exec("javac LastJava.java");
exec("java LastJava");
echo $disease;
if ($disease== "lung"){

// echo $disease;
if ($disease== 'lung'){
exec("\"C:\\Program Files\\MATLAB\\MATLAB Production Server\\R2015a\\bin\\matlab.exe\" -r \"run('C:\\xampp\\htdocs\\M21.m')\"");
}
else if($disease== "breast"){

exec("\"C:\\Program Files\\MATLAB\\MATLAB Production Server\\R2015a\\bin\\matlab.exe\" -r \"run('C:\\xampp\\htdocs\\M35.m')\"");
}
else if($disease== "collorectal"){

exec("\"C:\\Program Files\\MATLAB\\MATLAB Production Server\\R2015a\\bin\\matlab.exe\" -r \"run('C:\\xampp\\htdocs\\Simple.m')\"");
}
else{

exec("\"C:\\Program Files\\MATLAB\\MATLAB Production Server\\R2015a\\bin\\matlab.exe\" -r \"run('C:\\xampp\\htdocs\\M23.m')\"");
}
sleep(20);
// Print Saved results from file
$t= 20;
while (!file_get_contents('C:\Users\Vaibhav Srivastava\Desktop\Udaipur\Practice\result.txt')){
while (!file_exists('C:\\xampp\\htdocs\\result.txt')){
sleep($t);
$t= $t+10;
}
$c= file_get_contents('C:\Users\Vaibhav Srivastava\Desktop\Udaipur\Practice\result.txt');
echo "<h2 style= \"background-color: red; padding: 10%;\">" . $c. "</h2>";
$c= file_get_contents('C:\\xampp\\htdocs\\result.txt');
echo "<h2 style= \"background-color: red; padding: 10%;margin-left: 20%; margin-right: 20%; text-align: center;\">" . $c. "</h2>";
unlink('myfile.csv');
unlink('newfile.csv');
unlink('result.txt');
unlink('LastJava.class');
// $javafile= fopen("hello.java", "w") or die ("Unable to upen file!");
// exec("\"C:\\Program Files\\MATLAB\\MATLAB Production Server\\R2015a\\bin\\matlab.exe" -r \"run('C:\\Users\\Vaibhav Srivastava\\Desktop\\')\"");
// $javatxt= "import java.io.PrintWriter;\r\n
Expand All @@ -45,7 +49,7 @@


// {\r\n

// exec("\"C:\\Program Files\\MATLAB\\MATLAB Production Server\\R2015a\\bin\\matlab.exe" -r \"run('C:\\Users\\Vaibhav Srivastava\\Desktop\\')\"");

// public static void main(String args[]) throws Exception\r\n

Expand Down

0 comments on commit a77af2d

Please sign in to comment.