Documentation
The documentation is work-in-progress. Some questions might be answered in the FAQ section.
Also check out: Roadmap/Todo, Functions & FAQ.
Requirements
- Apache with mod_rewrite enabled.
- PHP 5.x - has only been tested with PHP 5.2.x and beyond, but should work in all versions of PHP 5 (maybe even PHP 4)
- No MySQL neccessary
Installation & configuration
The installation could not be simpler. Simply download the package, extract and copy the files to your
website directory. If the website is located in a sub-folder of a domain, eg. /john/newsite/ edit the
line in the .htaccess file that says
RewriteBase /
and change it to
RewriteBase /john/newsite/
After that you are ready to go!
Setting up the template
The index.php file in the root of your website acts as the template of the website. All your HTML should be put in there. You only have two functions in the template you can call: t() and c() - t() returns the site title and c() returns the site content
Creating site files
If you want to create a page/link you just make a new php document in the /site/ folder. For instance: /site/mypage.php - now if you navigate to your website and type in www.example.com/mypage/ you should see it's output.
The default page is /site/index.php - so that should be your home page
Creating site files with a class/function hierarchy
Lets say you have a site file named mypage.php (path www.example.com/mypage/) - you create a class named mypage and a function method in it named dostuff() for instance:
class mypage {
function dostuff () {
echo 'This is where you do stuff';
}
}
Now you can call www.example.com/mypage/dostuff/ and that function will be executed. If none is
is specified or you type in a name of a function that does not exist, you get the default function
which is index() - if index() is not specified and/or the class mypage - nothing gets called, so
the document becomes a flat php document.
Functions
If you want to create a page/link you just make a new php document in the /site/ folder.