The fastest easiest way to get it right.

Making Hello World a Public Page

In the previous lesson we saw how to make a simple "Hello World!" page and then we saw how to manually type in a link to see it.

However, the default for Andromeda is not to allow this page to be seen by anybody unless they are logged in. So we have to make the page public.

To make the page public, you must create an array called $MPPages and add an entry for "helloworld". Create a file called "applib.php" in your application directory and put the following code at the top:

# File: applib.php
# Put this at the top, outside of any function
$MPPages = array(

Note the spelling of the array, the first three letters are upper-case and the rest is lower case.

Note also that the page name is the index of the array. The actual value of the entry can be anything, it is ignored.

If your database application handles any sensitive information at all, it is always best to use a deny-by-default system, one that denies all access to all tables and pages unless a user has been explicitly granted access to the page or table. If you are unsure of this, ask yourself, in the event you make a mistake, would you rather find you had denied users access to something they should see, or would you rather find out that your website had been exposing sensitive data to the world?
comments powered by Disqus
Home |  Documentation |  Download |  Credits |  Contact |  Login
Andromeda © Copyright 2004-2013, Licensed under the GPL Version 2