Add files via upload
This commit is contained in:
parent
a8ca22f392
commit
54e28093b9
|
@ -4,5 +4,5 @@ $orientation = $_REQUEST["orientation"];
|
||||||
$toggler = $_REQUEST["toggler"];
|
$toggler = $_REQUEST["toggler"];
|
||||||
|
|
||||||
|
|
||||||
$output = shell_exec('/usr/bin/python3 focus.py '.$nb_step.' '.$orientation.' '.$toggler);
|
$output = shell_exec('/usr/bin/python3 /var/www/html/pipeline/focus.py '.$nb_step.' '.$orientation.' '.$toggler);
|
||||||
?>
|
?>
|
||||||
|
|
1
pipeline/newfile.txt
Normal file
1
pipeline/newfile.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ceciestuntexte
|
|
@ -9,6 +9,11 @@ $(document).ready(function(){
|
||||||
pump()
|
pump()
|
||||||
|
|
||||||
});
|
});
|
||||||
|
$( "#write" ).click(function() {
|
||||||
|
write()
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +21,7 @@ function focus(toggler) {
|
||||||
var value = $("#nb_step").val();
|
var value = $("#nb_step").val();
|
||||||
var orientation = $("#orientation").val();
|
var orientation = $("#orientation").val();
|
||||||
var xmlhttp = new XMLHttpRequest();
|
var xmlhttp = new XMLHttpRequest();
|
||||||
xmlhttp.open("GET", "focus.php?nb_step="+value+"&orientation="+orientation+"&toggler="+toggler, true);
|
xmlhttp.open("GET", "pipeline/focus.php?nb_step="+value+"&orientation="+orientation+"&toggler="+toggler, true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +30,16 @@ function pump() {
|
||||||
var flowrate = $("#flowrate").val();
|
var flowrate = $("#flowrate").val();
|
||||||
var direction = $("#direction").val();
|
var direction = $("#direction").val();
|
||||||
var xmlhttp = new XMLHttpRequest();
|
var xmlhttp = new XMLHttpRequest();
|
||||||
xmlhttp.open("GET", "pump.php?volume="+volume+"&flowrate="+flowrate+"&direction="+direction, true);
|
xmlhttp.open("GET", "pipeline/pump.php?volume="+volume+"&flowrate="+flowrate+"&direction="+direction, true);
|
||||||
xmlhttp.send();
|
xmlhttp.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function write(){
|
||||||
|
|
||||||
|
var xmlhttp = new XMLHttpRequest();
|
||||||
|
xmlhttp.open("GET", "pipeline/write.php?txt=ceciestuntexte", true);
|
||||||
|
xmlhttp.send();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,5 +4,5 @@ $flowrate = $_REQUEST["flowrate"];
|
||||||
$direction = $_REQUEST["direction"];
|
$direction = $_REQUEST["direction"];
|
||||||
|
|
||||||
|
|
||||||
$output = shell_exec('/usr/bin/python3 pump.py '.$volume.' '.$flowrate.' '.$direction);
|
$output = shell_exec('/usr/bin/python3 /var/www/html/pipeline/pump.py '.$volume.' '.$flowrate.' '.$direction);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -5,7 +5,7 @@ from time import sleep
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
vol = int(sys.argv[1])
|
vol = int(sys.argv[1])
|
||||||
flowrate = int(sys.argv[2])
|
flowrate = float(sys.argv[2])
|
||||||
dir = str(sys.argv[3])
|
dir = str(sys.argv[3])
|
||||||
|
|
||||||
kit = MotorKit()
|
kit = MotorKit()
|
||||||
|
|
6
pipeline/write.php
Normal file
6
pipeline/write.php
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
$txt = $_REQUEST["txt"];
|
||||||
|
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
|
||||||
|
fwrite($myfile, $txt);
|
||||||
|
fclose($myfile);
|
||||||
|
?>
|
Loading…
Reference in a new issue