“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↓
Loadable file formats are (ordered by priority) :
- PHP files with .inc.php
- PHP files with .php
- include file with .inc
- HTML file with .html
(NOTE：WITHOUT XHTML header and footer)
- Pre formatted text file with .txt
- Markdown text file with .text
To add pre-formatted text, use:
To add Markdown text, use:
To add XHTML marked-up file, use:
To add executable PHP file, use:
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
to load it correctly.
This manual page is one of a SAMPLE page. If you chek URI of this page, you can see:
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:
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:
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:
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:
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”,
- Just copy /vars-sample/ directory and rename it as you like.
- Open index.php with the text editor of your choice and edit USER CONFIG.
- That’s it!