我已经试着解决这个问题好几个小时了,但都没有成功。我搜索过类似的问题,但都没用
PHP文件-用Notepad++编写:
<?php
$item='example';
$tmp = shell_exec("C:\Python34\python.exe TestingStuff.py .$item");
echo $tmp;
?>
在浏览器(使用Apache)中运行此文件时,我将执行以下输出:
['TestingStuff.py', '.example'] .example
Python文件-以空闲方式编写:
#!c:\python34\python.exe
import sys
print(sys.argv[1])
运行此命令时,我收到以下错误:
IndexError: list index out of range
运行print(sys.argv)
时,输出为['C:/xampp/htdocs/TestingStuff.py']
目前没有回答
相关问题 更多 >
编程相关推荐