Thursday, June 20, 2013

yii framework tutorial - fast

1.download, extract di ROOT, di folder yii
[server]
--www = ROOT
     -- yii = CREATE MANUAL
          -- demos
          -- framework
          -- requirements
--etc

akses : www.domain.com/yii/requirements
pastikan yang dipakai = Passed

2.keluarkan folder yii  ke luar WEBROOT = utk security
[server]
--www = ROOT
-- yii
    -- demos
    -- requirements
    -- framework
--etc

3.Bila xampp di c:\xampp, maka CEK PHP bisa JALAN dengan :
buka COMMAND, ketik:   c:\xampp\php\php.exe -v

4.di COMMAND,jalankan yiic utk generate webapp

[path]php.exe     [path]yiic   webapp       [path ke ROOT]
contoh:
     c:\xampp\php\php.exe      [server]yii\framework\yiic  webapps     [server]/www

ada konfirmasi, ketik : yes, susunan folder menjadi :
--www = ROOT
      -- assets
      -- css
      -- images
      -- themes
      --protected
--yii
--etc


5. cek: www.domain.com, maka muncul basic yii

6. MORE SECURE: pindah folder protected ke luar ROOT
--www
      -- assets
      -- css
      -- images
      -- themes
--yii
--protected
--etc

edit di index.php, baris ke 5
$config=dirname(__FILE__).'/protected/config/main.php';
menjadi
$config=dirname(__FILE__).'../protected/config/main.php';

7. buka ../protected/config/main.php
ganti name = Aplikasi Baru

8. cek www.domain.com, lihat name nya

9. di main.php itu juga, aktifkan:
gii
urlManager
db  = pakai MySQL
log, pakai CWebLogRoute (baris 78)

10. cek domain.com, maka dibagian bawah muncul log yg indah :)






No comments:

Post a Comment