What’s “VARS”?

“VARS” page is a “VARIABLE” page. You can add more pages and expand your contents easily by adding TEXT files, include files, HTML files and PHP program files.


How “var/index.php” works
/var/index.php is the PHP script to load text files or execute PHP program files stored in /contents/ directory.

Here’s an example↓

var/index.php

   /contents/foo.inc.php

            /foo.txt

            /foo.php

            /foo.inc

            /foo.html

            /foo.text

            /sys_info.inc.php

Loadable file formats are (ordered by priority) :

  1. PHP files with .inc.php
  2. PHP files with .php
  3. include file with .inc
  4. HTML file with .html
    (NOTE:WITHOUT XHTML header and footer)
  5. Pre formatted text file with .txt
  6. Markdown text file with .text

To add pre-formatted text, use:

  • foo.txt

To add Markdown  text, use:

  • foo.text

To add XHTML marked-up file, use:

  • foo.inc
  • foo.html

To add executable PHP file, use:

  • foo.inc.php
  • foo.php
  • foo.inc

By default, when you access “var/index.php”, it laods “default.inc.php”. If you want to replace it with your original default file, please name it

  1. default.inc.php
  2. default.php
  3. default.inc
  4. default.html
  5. default.txt
  6. default.text

to load it correctly.

SAMPLES
This manual page is one of a SAMPLE page. If you chek URI of this page, you can see:

../var/index.php?id=en_03

and the substance of this page is en_03.html file in /contents/ folder.

First, please write a simple page with basic XHTML tags LIKE:

<h1>TITLE</h1>

<h2>SUB-TITLE</h2>

<p>CONTENTS<br />

CONTENTS AFTER LINE-BREAKS.</p>

If you want to use pre-formatted text file, just add pretags in the beggining and in the end of the file LIKE:

<pre>

body{

    background: #ffffff;

    color: #000000;

    font-size: 100%;

}

</pre>

When you finished writing your file, name it as you like and save it with .txt extension, put it in the /contents/ directory, and access to:

../var/index.php?id=your_file

Your article is called by id. If you want to stock your files named by date like 20051115, save it as 20051115.html and load it by:

../var/index.php?id=20051115

Got it?


F.A.Q

Q1: Can I create more “VARS” directories under “VARS” ?

A1: Yes. It’s extremely easy if you know how to duplicate the file :-).

If you want to create more directories under “var”,

  1. Just copy /vars-sample/ directory and rename it as you like.
  2. Open index.php with the text editor of your choice and edit USER CONFIG.
  3. That’s it!

Simple & W3C-Valid Log System