0
shell.php集成时,脚本不工作:Python的文件处理使用PHP
<?php
shell_exec("python /opt/lampp/htdocs/web_test/script.py ")
?>
script.py:
fo = open("/opt/lampp/htdocs/web_test/hello.txt", "w")
fo.write("Python is a great language.\nYeah its great!!\n")
fo.close()
壳.php <?php她ll_exec(“python /opt/lampp/htdocs/web_test/script.py”)?> –
尝试提供Python二进制文件的完整路径,例如'/ usr/bin/python',并确保script.py可以被用户谁将运行它(万维网数据?) – apokryfos
还没有工作 –