bubba66
11-12-2010, 08:02 AM
Hi,
I'm trying to maintain state across multiple php calls from java - but failing.
By state I mean the variable / function space - see below:
QuercusEngine qe = new QuercusEngine();
qe.execute("<?php function foo() { echo 'hello foo\n'; } ?>");
qe.execute("<?php foo(); ?>");
Unfortunately on the last line I get - instead I'd like to be able to call the function foo:
Exception in thread "main" com.caucho.quercus.QuercusErrorException: eval::1: Fatal Error: 'foo' is an unknown function.
at com.caucho.quercus.env.Env.error(Env.java:6469)
at com.caucho.quercus.env.Env.error(Env.java:6355)
Any help would be appreciated.
Thanks.
I'm trying to maintain state across multiple php calls from java - but failing.
By state I mean the variable / function space - see below:
QuercusEngine qe = new QuercusEngine();
qe.execute("<?php function foo() { echo 'hello foo\n'; } ?>");
qe.execute("<?php foo(); ?>");
Unfortunately on the last line I get - instead I'd like to be able to call the function foo:
Exception in thread "main" com.caucho.quercus.QuercusErrorException: eval::1: Fatal Error: 'foo' is an unknown function.
at com.caucho.quercus.env.Env.error(Env.java:6469)
at com.caucho.quercus.env.Env.error(Env.java:6355)
Any help would be appreciated.
Thanks.