PHP Tutorial

 

Table of Contents

Generating Output

Run the Program to Generate Output

To start, you will simply generate the output by running the program through the debugger without setting any breakpoints.

  1. Specify datafile directory Ensure that the directory specified on line 19 of the program exists as a root directory on the drive where guestbook.php is stored.
  2. Configure debugging options From the menu, select Debug|Start (or <F5>). In the Debugging Options dialog box, configure the following options:
    • General tab: Select the Simulate CGI Environment check box
    • CGI Input tab:
      • Set the Request Method option button to Post.
      • From the Post Type drop-down list, Select URL encoded.
      • From the Type drop-down list, select the variable type Post.
      • Enter the following names in the Name text box, entering a meaningful value for each in the Value text box. For example, the value for "name" could be your own name. Click the Add button after each entry to add it to the Browser Arguments.
        • "name"
        • "email"
        • "company"
        • "message"
  3. Run the debugger Click OK to run the debugger with the selected options.
  4. View the Output tab Notice the messages in the bottom left corner of the Komodo screen; these inform you of the status of the debugger.
  5. View the rendered HTML Click on the "Toggle HTML Preview" button to the right of the Output pane. The HTML is displayed in the Output pane; previous guestbook entries are displayed at the top of the output, and the HTML form is displayed at the bottom. Click "Toggle HTML Preview" again to return to the HTML code.
  6. Create New File To create a new HTML file that contains the HTML code in the Output pane, select File|New|New File. In the New File dialog box, select the HTML Category, and the HTML 4.01 Template. Click OK.
  7. Save the Output Delete the contents of the new HTML file tab in the Editor pane, then select the contents of the Output pane (Ctrl+A). Copy the contents to the new HTML file tab in the Editor pane (Ctrl+C, Ctrl+V). Select File|Save As to save the file with a unique name.

Top Previous Next