|
From: <php...@li...> - 2010-05-02 13:16:28
|
Thanks so much! I'll try this out and let you know how it goes. > Date: Sun, 2 May 2010 13:14:39 +0200 > To: php...@li... > From: php...@li... > Subject: Re: [Php-java-bridge-users] Access to a Drupal site > > > http://php-java-bridge.sourceforge.net/pjb/server/documentation/API/index.html > > Link was incorrect. Correct link: > > http://php-java-bridge.sourceforge.net/pjb/server/documentation/API/php/java/script/servlet/EngineFactory.html > > On 5/2/10, Jost Boekemeier <jos...@go...> wrote: > >> auto_prepend_file=JavaProxy.php > > > > auto_append_file=JavaProxy.php > > > > > > > > On 5/2/10, Jost Boekemeier <jos...@go...> wrote: > >> Hi, > >> > >> isn't it possible to use the JSR 223 API to call your (external or > >> internal) PHP script methods? > >> > >> > >> Any PHP script which contains the call > >> > >> java_call_with_continuation() > >> > >> automatically implements the javax.script.Invocable interface. Example: > >> > >> > >> <?php //script.php > >> require_once("Java.inc"); > >> ... > >> java_call_with_continuation(); > >> // reached after ((Closable)e).close() has been called > >> ?> > >> > >> main(String s[]) throws Throwable { > >> ScriptEngine e = new > >> ScriptEngineManager().getEngineByName("php-invocable"); > >> e.eval(new URLReader("http://localhost/drupal/script.php"); > >> Invocable i = (Invocable)e; > >> System.out.println(i.invokeFunction("phpversion", new Object[]{})); > >> ((Closeable)e).close(); > >> } > >> > >> > >> You can append java_call_with_continuation() to a specific script or > >> to all scripts using the php.ini directive: > >> > >> auto_prepend_file=JavaProxy.php > >> > >> > >> For internal scripts you can also use the RequestDispatcher to include > >> the PHP resource. > >> > >> Please see > >> > >> http://php-java-bridge.sourceforge.net/pjb/server/documentation/API/index.html > >> > >> and > >> > >> http://php-java-bridge.sourceforge.net/pjb/docs/php-api/JavaBridge/_JavaBridge.inc.html#functionjava_call_with_continuation > >> > >> for details. > >> > >> > >> Regards, > >> Jost Bökemeier > >> > > > > ------------------------------------------------------------------------------ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users _________________________________________________________________ If It Exists, You'll Find it on SEEK. Australia's #1 job site http://clk.atdmt.com/NMN/go/157639755/direct/01/ |