diff options
author | Filipp Lepalaan <filipp@mekanisti.fi> | 2009-10-26 14:34:44 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mekanisti.fi> | 2009-10-26 14:34:44 +0200 |
commit | 735c8bf38f0b1c66470fdff312eacfcc21ab8ae8 (patch) | |
tree | 13248e6ad519057baf63b5c60b787bbadf34ebf9 /README | |
parent | 56ae4ac94b1775bb58c63b5ed83bead4369dcdd1 (diff) | |
parent | 1038b52baf3e67c024527eb27f7493d9cbcae438 (diff) | |
download | main-735c8bf38f0b1c66470fdff312eacfcc21ab8ae8.tar.gz main-735c8bf38f0b1c66470fdff312eacfcc21ab8ae8.tar.bz2 main-735c8bf38f0b1c66470fdff312eacfcc21ab8ae8.zip |
Merge branch 'master' of github.com:filipp/main
Diffstat (limited to 'README')
-rw-r--r-- | README | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ +MAIN - the simple PHP framework + +## Folder structure ## + +site: + public (this is the DocRoot for your site) + index.php + system (put all system support files in here) + lib + main + classes (store all your model files in here) + views (create a folder for each controller and an action.html file for every view) + data (a good place to store all your application data, logs, etc) + +## index.php ## + +A typical index.php using MAIN would look like this: +<?php + + $sysdir = realpath(dirname(__FILE__).'/../system'); + + set_include_path( + get_include_path() . PATH_SEPARATOR + . $sysdir . PATH_SEPARATOR + . "{$sysdir}/lib" . PATH_SEPARATOR + . "{$sysdir}/conf" . PATH_SEPARATOR + . "{$sysdir}/classes" . PATH_SEPARATOR + ); + + require_once "main/app.php"; + require_once "main/controller.php"; + $locale = App::locale(); + setlocale(LC_ALL, $locale); + session_start(); + App::init(); + +?> |