前提是需要在本地配置好python的运行环境,然后在需要在php的运行环境中将python的这个文件放在所在的目录下,用Python命令执行没问题的花,就可以执行了
header("Content-Type: text/html; charset=UTF-8 ");
$output = shell_exec('python h.py');
前提是需要在本地配置好python的运行环境,然后在需要在php的运行环境中将python的这个文件放在所在的目录下,用Python命令执行没问题的花,就可以执行了
header("Content-Type: text/html; charset=UTF-8 ");
$output = shell_exec('python h.py');