与PHP集成时,Python文件处理脚本无法正常工作

时间:2017-10-08 10:34:07

标签: php python shell file-handling

shell.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()

1 个答案:

答案 0 :(得分:0)

检查写作权限

user.focus();
user.value = 'JohnDoe';
user.blur();
button.click();