Creating Apache Derby Applications with PHP

For the purposes of testing your PHP installation, create a file called 'hello-derby.php' containing the following lines:

<?php
  echo "Hello, Apache Derby world!";
?>

Running PHP Scripts from the Command Line

To run a PHP script on Windows operating systems, you can explicitly invoke the PHP interpreter to run hello-derby.php from the command line by invoking the name of the PHP interpreter, followed by the name of the script. The name of the PHP interpreter for CGI applications is normally php.exe, while the name of the PHP interpreter for command line (CLI) applications is normally php-cli.exe. To run our example script as a PHP CLI application, issue the following command:

 C:/> php-cli hello-derby.php ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.