[英]How to show my IP Address on Flask?
我在Flask Python Web上顯示我的IP地址時遇到問題。 打個比方,如果在PHP編程中很容易就可以使用
echo $_SERVER['SERVER_ADDR'];
但是我不知道如何在Python Flask Web中顯示IP地址。
應用程序在192.168.43.46:4000上運行,而我想顯示:
<iframe id="form-iframe" src="http://192.168.43.46/vshell/index.php?type=services&clearcache=true" style="margin:0; width:100%; height:640px; border:none; overflow:hidden;" onload="AdjustIframeHeightOnLoad()"></iframe>
燒瓶中使用的腳本
<iframe id="form-iframe" src="{{ request.script_root }}/vshell/index.php?type=services&clearcache=true" style="margin:0; width:100%; height:640px; border:none; overflow:hidden;" onload="AdjustIframeHeightOnLoad()"></iframe>
並且出現在客戶端瀏覽器上:
如何顯示:
src="http://192.168.43.46/vshell/index.php?type=services&clearcache=true"
在燒瓶上?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.