在Oracle PL / SQL中调用PHP函数

我正在使用Oracle Application Express,我想知道是否可以在pl / sql页面进程中调用php? </ p>

我可以在pl / sql中使用htp.p或htp.prn吗?</ p>

例如,假设我在服务器上有一个php函数 返回本地机器的remote_addr - 我基本上想要捕获这个函数值并将其添加到我创建的oracle日志表中。</ p>

希望有人可以提供帮助。</ p >

谢谢。</ p>
</ div>

展开原文

原文

I am using Oracle Application Express and I was wondering whether it's possible to call php inside a pl/sql page process?

Can I use htp.p or htp.prn in pl/sql?

For example, let's say I have a php function on the server that returns the remote_addr of the local machine - I basically would like to capture this function value and add it to an oracle log table that I have created.

Hoping someone can assist.

Thanks.

1个回答



听起来很丑。
据我所知,Web服务器接受浏览器请求,并将其发送到数据库或PHP “服务器”(或预处理器或其他)或直接服务(如果它像javascript库一样在Web服务器上作为平面文件)。</ p>

如果你想让Oracle'' 看到'PHP函数的结果,唯一的方法是让PHP服务器在将请求(和函数结果)传递给Apex之前先执行该函数。 </ p>

我认为你最好看看PHP如何确定remote_addr(例如它只是查看CGI_ENV变量)并在数据库中复制它。</ p>
< / DIV>

展开原文

原文

Sounds ugly. As I understand it, the web server takes the browser request, and fires it off to either the database or the PHP 'server' (or preprocessor or whatever) or services it directly (if it is comesthing like a javascript library sitting as a flat file on the web server).

If you want Oracle to 'see' the result of the PHP function, the only way would be for the PHP server to execute the function first, before passing the request (and function result) to Apex.

I think you are best off looking at how the PHP determines the remote_addr (eg is it just looking at a CGI_ENV variable) and replicating that in the database.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问