php5.2好像不提供调用java的类了,所以就用了java bridge,但是php的服务器又用的nginx,不支持java bridge,所以考虑把java转到tomcat上,按照这上面做的
http://php-java-bridge.sourceforge.net/pjb/webapp.php,但是做测试的时候出下面的错误:
Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/www/hdwiki/test.php on line 2
Warning: require_once(http://localhost:8080/pdfConv/java/Java.inc) [function.require-once]: failed to open stream: no suitable wrapper could be found in /home/www/hdwiki/test.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'http://localhost:8080/pdfConv/java/Java.inc' (include_path='.:/usr/local/webserver/php/PEAR') in /home/www/hdwiki/test.php on line 2
php中这样写的:
require_once("http://localhost:8080/pdfConv/java/Java.inc"); //必须包含的配置文件
$test = new Java("PDF2SWFUtil"); //产生实例