该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
已经解决了部分,
前页面用这个192.168.1.1/test.html
Your first name:
Your last name:
Click here to submit form:
后台/cgi-bin/fcoe_config.py用这个.
#!/usr/bin/pythonimport cgiimport os
def main(): print "Content-type: text/html\n"
form = cgi.FieldStorage() # parse query
if form.has_key("firstname") and form["firstname"].value != "":
# print "
Hello", form["firstname"].value, "
"cmd = str(form["firstname"].value)
#print cmd
res = os.popen(cmd).readlines()
print res
else:
print "
Error! Please enter first name.
"main()