i have the follwing HTML with javascript calling a PHP file
<html>
<head>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
function doSomething() {
$.get("mySample.php");
return false;
}
</script>
<body class="page_bg">
<a href="#" onclick="doSomething();">Click Me!</a></head>
</body>
</html>
when it is executed it should call up "mySample.php" script, whose code is given below
<?php
#if ($_GET['run'])
{
# This code will run if ?run=true is set.
exec("python visualization.py");
}
?>
then this piece of code calls up the python script called visualization.py, which results in some.html file, which i want to get back in the browser.
- Given above approach is not working
- Is it correct?