are.ehibou.com

September 25, 2009

php+tomcat on windows

Filed under: Side Notes, php, tomcat — Tags: , , , , — admin @ 6:09 pm

Got a task to install php on top of tomcat (Tomcat5) on Windows.
Was strugling to make it work for a while. Was reading wrong blogs and newsgroups for a while without success untill I found a very good resource – JavaBridge. It was so easy as to run msi to install php and to copy paste a war file to the Tomcat’s webapps folder.

  • Share/Bookmark

September 12, 2008

anonymous, dynamic, variable classes and methods

Filed under: Side Notes, php — Tags: — admin @ 2:53 pm

To call a method by dynamic name you can do this:

$methodName="MyMethod";
$result=$methodName();

To create a class by dynamic name you can do this:

$className="MyClass";
$classVar=new $className;

To call any method by dynamic name in previously initialized class you can do this:

$methodName="MyMethod";
$result=$classVar->$methodName();
  • Share/Bookmark

Powered by WordPress