The fastest easiest way to get it right.

Hello World

Andromeda aims to keep simple things simple and to make complicated things manageable. With that in mind, a basic Hello World! program is a very simple thing to do. The following code snippet demonstrates this:

<?php
class x6helloworld extends androX6 {
    function x6main() {
        echo "Hello World!";
    }
}
?>

As we can see, every Andromeda page exists as a PHP file that has a class in it. The class always extends the built-in class "androX6" (note the case, the "X" is uppercase the rest is lowercase). The class itself is always named "x6" plus the name of the page:

x6 + {pageName} = x6helloworld

This program should be saved in a file named "x6helloworld.php" in your application directory.

To see this page, go to your application, log in, and then type into the address bar "/path/to/app/index.php?x6page=helloworld".

Linux file names are case-sensitive. You must name your file using the exact case that you provide to the x6page parameter.

The x6main should send its HTML directly to output. There is no need to worry about buffering, Andromeda takes care of that.

User Comments

There are no user comments yet on this page.


Add A Comment

Comments will not appear until after they are moderated. Comments are usually moderated within a few hours on weekdays, but may take longer on weekends and holidays.

Name or nickname: (This will appear with your comment)


Email (this will never be displayed)


Enter your comment here. Use [b] and [/b] for bold, [i] and [/i] for italic, and [pre] and [/pre] for code samples. All literal HTML and PHP that you enter will be escaped out and displayed as you enter it.


Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2010, Licensed under the GPL Version 2