问题描述
在Please enter number of rows
2
Please enter number of columns
2
Enter first [0][0] integer
12
Enter first [0][1] integer
36
Enter first [1][0] integer
25
Enter first [1][1] integer
23
服务器上通过表单提交两个值时,我想执行一个简单的Python
脚本,但是我收到一个Nginx
错误。
我使用以下形式,存储在405 Not allowed
中:
/var/www/html/some_site/index.html
按下提交时我要执行的脚本存储在<form action="./py/script.py" method="post">
<input type="text" name="some_text"/>
<input type="text" name="some_other_text"/>
<input type="submit" value="Submit"/>
</form>
中,并包含以下几行:
/var/www/html/some_site/py/script.py
如何告诉import cgi
cgitb.enable()
form = cgi.FieldStorage()
some_text = form.getvalue('some_text')
some_other_text = form.getvalue('some_other_text')
# do stuff based on some_text and some_other_text
允许执行此脚本?这是我第一次尝试创建一个将输入传递给脚本的简单网站。任何帮助表示赞赏! :)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)