aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mekanisti.fi>2009-10-25 15:56:08 +0200
committerFilipp Lepalaan <filipp@mekanisti.fi>2009-10-25 15:56:08 +0200
commit1038b52baf3e67c024527eb27f7493d9cbcae438 (patch)
tree1adcf54cc165816b2b53724836dc56861905f971
parent46283ee631d6233c43279147191ada605308dd42 (diff)
downloadmain-1038b52baf3e67c024527eb27f7493d9cbcae438.tar.gz
main-1038b52baf3e67c024527eb27f7493d9cbcae438.tar.bz2
main-1038b52baf3e67c024527eb27f7493d9cbcae438.zip
Added README
-rw-r--r--README37
1 files changed, 37 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..4054ef7
--- /dev/null
+++ b/README
@@ -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();
+
+?>