python django 獲取用戶IP地址的方法

函數實現:  html if 'HTTP_X_FORWARDED_FOR' in request.META: client_ip = request.META['HTTP_X_FORWARDED_FOR'] client_ip = client_ip.split(",")[0] else: client_ip = request.META['REMOTE_ADD
相關文章
相關標籤/搜索