I have two files in my "py" file in the "www" in wamp (local server) the first file is python and the code is:
print("Hello")
print("Jane")
print("doe")
the script in php:
<!DOCTYPE>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>php with py</title>
</head>
<body>
<h1>Hi</h1>
<?php
$output = array();
exec("py C:\wamp64\www\py\py_8.py", $output);
var_dump( $output);
?>
</body>
</html>
it doesn't work, I get this error:
C:\wamp64\www\py\py_8.php:19:
array (size=0)
empty
I have checked in cmd that line:
py C:\wamp64\www\py\py_8.py
and it works!
what is wrong?