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 2Warning: 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 2Fatal 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 2php中这样写的:
require_once("http://localhost:8080/pdfConv/java/Java.inc"); //必须包含的配置文件
$test = new Java("PDF2SWFUtil"); //产生实例
Warning: require_once() [function.require-once]: URL file-access is disabled in the server configuration in /home/www/hdwiki/test.php on line 2Warning: 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 2Fatal 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 2php中这样写的:
require_once("http://localhost:8080/pdfConv/java/Java.inc"); //必须包含的配置文件
$test = new Java("PDF2SWFUtil"); //产生实例
require_once("/pdfConv/java/Java.inc");
错误如下 Warning: require_once(/pdfConv/java/Java.inc) [function.require-once]: failed to open stream: No such file or directory in /home/www/hdwiki/test.php on line 2Fatal error: require_once() [function.require]: Failed opening required '/pdfConv/java/Java.inc' (include_path='.:/usr/local/webserver/php/PEAR') in /home/www/hdwiki/test.php on line 2
require_once("http://localhost:8080/pdfConv/java/Java.inc");
需要令
allow_url_include = On