PHP Hello World

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
Line 17: Line 17:
 
#Browse to the directory where you unzipped the resin download (ie: c:\resin-3.0.14)
 
#Browse to the directory where you unzipped the resin download (ie: c:\resin-3.0.14)
 
#Double-click httpd.exe.  At this point the resin web server should start.
 
#Double-click httpd.exe.  At this point the resin web server should start.
#Open your favorite browser and type in the following URL: http://localhost:8080/  Make sure that the "Resin Default Home Page" appears.  If so, you have Resin installed.
+
#Open your favorite browser and type in the following URL:
 
+
==Part II: Using Resin's PHP==
+
===Example web.xml===
+
<web-app xmlns="http://caucho.com/ns/resin">
+
  <servlet-mapping url-pattern="*.php"
+
                    servlet-class="com.caucho.php.servlet.PhpServlet">
+
    <init compile="false"/>
+
  </servlet-mapping>
+
</web-app>
+
 
+
===Example PHP code===
+
+
<?php
+
+
echo "Hello World";
+
+
?>
+
[http://www.example.com link title][[Link title]]
+

Revision as of 17:49, 14 November 2005


The short article is intended for PHP programers who are interested in trying Resin's implementation.

It is written for users of windows.

Part I: Installing Resin

Downloading and unzipping Resin

  1. Navigate to w.caucho.com/download
  2. Download the latest Resin Binary for your computer. For purposes of this demo, I have downloaded the Windows .zip binary.
  3. Save the file to your desktop.
  4. Double click the binary and unzip the file. For purposes of this demo, I have unzipped the file to c:\resin-3.0.14

Running Resin for the first time

  1. Browse to the directory where you unzipped the resin download (ie: c:\resin-3.0.14)
  2. Double-click httpd.exe. At this point the resin web server should start.
  3. Open your favorite browser and type in the following URL:
Personal tools