如何在 Oracle ApEx 中获取 PC 的本地 IP 地址
我需要一种从 Oracle ApEx 中获取本地 IP 地址(ipconfig 命令信息中列出的 Windows 框)的方法。
这可能吗?我已经尝试了 owa_util.get_cgi_env('REMOTE_ADDR')
以及 sys_context( 'userenv', 'ip_address' )
只是似乎无法获取我的本地 PC IP Oracle ApEx 内的地址。
有什么想法吗?
I need a means of obtaining the local IP Address (Windows box listed in ipconfig command info) from within Oracle ApEx.
Is this possible? I have tried both owa_util.get_cgi_env('REMOTE_ADDR')
as well as sys_context( 'userenv', 'ip_address' )
Just can't seem to get my local PC IP address within Oracle ApEx.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要获取Oracle客户端 IP地址,您必须使用您建议的地址::
要获取Oracle服务器 IP地址,您可以使用:
更新(来自评论) :如果您正在寻找应用程序服务器IP,而不是客户端或服务器。正确的?这是oracle无法获得的。这就像询问 oracle Web 服务器 IP。由于 Oracle Appex 是 100% PLSQL,因此您无法获取此信息。
To obtain the Oracle Client IP address you have to use the one you suggested::
To obtain the Oracle Server IP address you can use:
UPDATE (from comment): If you are looking for the application server IP, nor client nor server. Right? This cannot be obtained by oracle. This is like asking oracle the web server IP. As Oracle Appex is 100% PLSQL you cannot obtain this information.
请记住,您的 PC 通过 ipconfig 告诉您的内容可能是本地网络 IP 地址。我的家庭 PC 被本地路由器分配的地址为 192.168.0.10,这与世界各地网络上的一万台其他 PC 相同。
也就是说,看看这个或这有任何帮助。
Bear in mind what your PC tells you, with ipconfig, may be a local network IP address. My home PC is assigned its address by the local router as 192.168.0.10 which would be same as ten thousand other PCs on networks around the world.
That said, see if this or this is any help.
如果您的应用程序部署在云上并且它将返回唯一的公共 IP 地址,则这将不起作用。
This will not work if your application is deployed on the cloud and it will return the only public IP address.