Home >php教程 >PHP源码 >PHP与java 通信插件

PHP与java 通信插件

PHP中文网
PHP中文网Original
2016-05-20 12:58:091330browse

跳至

复制Java.inc放到网站目录里面调用就OK了
/usr/local/php/lib/php/extensions/no-debug-zts-20100525/java/Java.inc
修改:
define ("JAVA_HOSTS", "127.0.0.1:8080");
// define ("JAVA_PERSISTENT_SERVLET_CONNECTIONS", true);
// define ("JAVA_PREFER_VALUES", 1);
define ("JAVA_DEBUG", false);
define ("JAVA_PIPE_DIR", "/data/test/java-tmp"); //这个是缓存文件地址

                       

           

2. [代码][PHP]代码     

// http://c.3viso.cn/java.php  这是一个测试小程序
#!/usr/bin/php

getProperty("java.version")." ";
$str=new Java("java.lang.String");
echo $str;

           

       

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:身份证 中提取生日Next article:PHP验证码函数