page

From SkyPHP

Jump to: navigation, search

Pages on your website are stored in the "pages" folder.

Contents

Viewing A Webpage

  1. http://example.com/a --> executes pages/a.php
  2. http://example.com/b --> executes pages/b/b.php
    • pages/b/b.css is auto-linked
    • pages/b/b.js is auto-linked
  3. http://example.com/c.xml --> executes pages/c.xml.php

Note: The ".php" file extension and the "/pages/" portion of the file path are not part of the URL. However, other types of files should referenced as usual, i.e. http://example.com/pages/folder/file.css

Special Types of Pages

Automatic Features

The following is done for you before the page executes:

  1. include all functions & classes
  2. connect to the database
  3. start php session
  4. include all config.php files
  5. include the page settings file
  6. user authentication / check page access groups

Sample Page

pages/sample.php

<?
    $title = "Page title";
    $meta['description'] = "";
    $meta['keywords'] = "";

    template::inc('website','top');
?>

    <h1><?=$title?></h1>
    <p>
        This is a sample page.
    </p>

<?
    template::inc('website','bottom');
?>
Personal tools