开发者

Use .class file in php

开发者 https://www.devze.com 2023-02-08 04:25 出处:网络
I need to use a .class file to encrypt data.What will be the php code for the following jsp line jsp:useBean id=\"enc\" class=\"Cryptn\" scope=\"session\"

I need to use a .class file to encrypt data.What will be the php code for the following jsp line

jsp:useBean id="enc" class="Cryptn" scope="session"

or is there 开发者_如何转开发another way to do it?


Your options are:

  1. Expose the java functionality in a web-service and call the web-service from php.
  2. Reimplement the functionality in php.


I don't think you can create a new object from a Java class file in PHP. However, you can invoke arbitrary commands from PHP, such as commandline-stuff, i.e.: "java YourClass".

You might be able to use your class that way. Other options are the two @Klaus Byskov Hoffmann mentions.


You could take a look at the php/Java Bridge as a starting point.

0

精彩评论

暂无评论...
验证码 换一张
取 消