我创建了一个全局的字典.pythongTest={}然后在Web的调用方法中操作这个字典.python@app.route('/test',methods=['GET'])deftest():if"int"ingTest:ret=gTest["int"]=gTest["int"]+1else:ret=gTest["int"]=1returnstr(ret)在本地测试,结果就是我期望的,1,2,3,4,5,6...但是放在SAE/BAE上返回值是不固定的,1,2,3,1,2
添加回答
举报
0/150
提交
取消