Folder Structure

STRUKTUR FOLDER DAN FILE KICKFRAMEWORK

1. application
- controllers (folder berisi file-file controller, contoh indexController.php)
- models (folder berisi file-file untuk manajemen data dari database, contoh tables.php)
- views (folder yang berisi template HTML, terdiri dari folder fe dan be)


2. config (folder yang berisi file configurasi KickFramework)
- globalsetting.php
//DATABASE SETTING
define("DBDRIVER","mysql");
define("DBSERVER","localhost");
define("DBUSER",[nama_user_database]);
define("DBPASS",[password_user_database]);
define("DBNAME",[nama_database]);
   
//APPLICATION SETTING
define("DEFAULTCONTROLLER","index");
define("BASEURL","/");
   
//APPLICATION PATH SETTING
define("APPLICATION","application/");
define("CONTROLLERS", APPLICATION . "controllers/");
define("MODELS", APPLICATION . "models/");  
define("VIEWS", APPLICATION . "views/");
       
//GLOBAL PATH SETTING
define("DOCROOT", $_SERVER["DOCUMENT_ROOT"] . BASEURL);
define("TEMPFOLDER", DOCROOT . "temp/");
define("UPLOADFOLDER", DOCROOT . "uploads/");
define("COMPILEFOLDER", TEMPFOLDER . "tpl_compile/");
penggunaan KONSEP NICENAME, dijelaskan lebih lanjut pada bagian CONTROLLER.

//ADDITIONAL USING NICENAME CONCEPT eq. v3.kickframework.com/[nicename]
//define("USENICENAME",1);
//define("NICENAMECONTROLLER","profile");


3. kick (folder sistem dari KickFramework, lebih detail silakan klik menu CLASS REFERENCE)


4. temp (folder temporary sistem, jika sistem operasi LINUX pastikan CHMOD=777)
- tpl_compile (folder temporary SMARTY TEMPLATE ENGINE, jika sistem operasi LINUX pastikan CHMOD=777)


5. upload (folder untuk memuat upload file dari aplikasi,jika sistem operasi LINUX pastikan CHMOD=777)


6. .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]


7. index.php
session_start();    
error_reporting (E_ALL);
ini_set("display_errors",TRUE);
date_default_timezone_set("Asia/Jakarta");

set_include_path("."
    . PATH_SEPARATOR . "config/"
    . PATH_SEPARATOR . "kick/"
    . PATH_SEPARATOR . get_include_path()
);

require_once 'Kick.php';
Kick::run();

8. robot.txt (kontrol halaman atau folder agar tidak terindex oleh spider mesin pencari)
User-agent: *
Disallow: /
Disallow: /application/
Disallow: /config/
Disallow: /kick/
Disallow: /temp/
Disallow: /uploads/