腾讯云主机python flask host 绑定问题
大家讲道理
大家讲道理 2017-04-18 10:22:05
0
1
597

app.run(host='公网IP',port=8080)这样不能使用公网ip访问
app.run(host='内网IP',port=8080)这样可以使用公网ip访问
app.run(host='0.0.0.0',port=8080)这样可以使用公网ip访问

请问这是为什么?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
刘奇

Host is the listening host, whichever host is bound will be monitored. Binding 0.0.0.0 means monitoring all.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!