Physics & Computer Science > CP363 : Home > Implementation Information
Version: 2020-02-06 11:02

CP363 : PHP Web Pages

Web pages that contain PHP that is to be executed by hopper must follow a few simple rules:


A 'Hello World' Sample

The following code produces a simple 'Hello World' web page:

<html>
  <head>
    <title>Hello World</title>
  </head>
  <body>
    <?php
    print( 'hello world' );
    ?>
  </body>
</html>

See: http://hopper.wlu.ca/~dbrown/hello.php


Using phpinfo

The following code produces a formatted list of current PHP settings using the phpinfo function:

<html>
  <head>
    <title>PHP Info</title>
  </head>
  <body>
    <?php
    phpinfo();
    ?>
  </body>
</html>

The phpinfo function is very useful when you need to see the values of various Apache and PHP variables, particularly those passed from forms or through URLs.

See: http://hopper.wlu.ca/~dbrown/phpinfo.php