ご案内 自己紹介 ブログ 掲示板入口 ショッピング 写真集 レポート 動画 記念画像 特別 リンク メール
[TOPへ戻る]

CUSTOMIZE YOUR "VARS" PAGE

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
            /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

To add pre-formatted text, use:

  • foo.txt

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

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=manual_en

and the substance of this page is manual_en.txt 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 20031103, save it as 20031103.txt and call it by:

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

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!