是否可以同时使用JSP和PHP? [英] Is it possible to use JSP and PHP at the same time?

查看:187
本文介绍了是否可以同时使用JSP和PHP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1函数是用Java编写的,而另一个函数的API是用PHP编写的。
那么,是否可以同时使用JSP和PHP?

1 function is written in Java while the API of another function is written in PHP. So, is it possible to use JSP and PHP at the same time?

推荐答案

我会说你可以调用(来自您的Java代码)执行PHP脚本的不同过程,然后在Java代码中使用该PHP脚本的输出 - 但这当然不是最佳的,并且不允许您只调用一个PHP函数。

I would say that you could call (from your Java code) a different process to execute the PHP script, and then use the output of that PHP script in your Java code -- but that's certainly not optimal, and will not allow you to call only one PHP function.

在同一个应用程序中使用Java和PHP代码似乎有点复杂,我从未见过这样做 - 也没有在任何办法 ;所以,我可能会将PHP代码重写为Java (或Java代码到PHP),因此整个应用程序只用这两种语言中的一种编写。

Using both Java and PHP code in the same application seems a bit complicated, and I've never seen this done -- nor used in any way ; so, I would probably rewrite the PHP code to Java (or the Java code to PHP), so the whole application is written in only one of those two languages.



我从未尝试过,但可能可能会使用 Quercus - 例如: java和php集成


I've never tried it, but maybe a possibility would be using Quercus -- see, for instance : java and php integration

它似乎能够运行Drupal (一个流行的PHP CMS;这意味着相当多的功能)在Resin 3.1.6上运行Drupal 6.2 ;所以我说它可能值得一看......

It seems to be able to run Drupal (a popular PHP CMS ; which means quite a lot of functionnalities) : Running Drupal 6.2 on Resin 3.1.6 ; so I'd say it might be worth a look...

这篇关于是否可以同时使用JSP和PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆