FuelPHP FrameWork 進入! Enter~~

安裝之前有說過哩:請參考 FuelPHP FrameWork 初體驗~~
之前說過 作者將APP 整個包在FrameWork 內的蠢話. 我可以不承認嗎XDD
其實算是給開發人員快速進入,實作體驗FrameWork用的.
如果要自行快速分離請先參考 同事強做:【程式筆記】建立一個FuelPHP的應用程式Git Repository

如果這樣不能滿足你,接下來江示範如何調整.

以下範例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#建立專案 FuelPower
$ oil create FuelPower
Cloning into ./FuelPower...
remote: Counting objects: 14163, done.
remote: Compressing objects: 100% (4889/4889), done.
remote: Total 14163 (delta 9659), reused 13347 (delta 9042)
Receiving objects: 100% (14163/14163), 2.09 MiB | 281 KiB/s, done.
Resolving deltas: 100% (9659/9659), done.
Submodule 'docs' (git://github.com/fuel/docs.git) registered for path 'docs'
Submodule 'fuel/core' (git://github.com/fuel/core.git) registered for path 'fuel/core'
Submodule 'fuel/packages/auth' (git://github.com/fuel/auth.git) registered for path 'fuel/packages/auth'
Submodule 'fuel/packages/email' (git://github.com/fuel/email.git) registered for path 'fuel/packages/email'
Submodule 'fuel/packages/oil' (git://github.com/fuel/oil.git) registered for path 'fuel/packages/oil'
Submodule 'fuel/packages/orm' (git://github.com/fuel/orm.git) registered for path 'fuel/packages/orm'
Submodule 'fuel/packages/parser' (git://github.com/fuel/parser.git) registered for path 'fuel/packages/parser'
Cloning into docs...
remote: Counting objects: 5552, done.
remote: Compressing objects: 100% (1903/1903), done.
remote: Total 5552 (delta 3710), reused 5350 (delta 3546)
Receiving objects: 100% (5552/5552), 1.73 MiB | 281 KiB/s, done.
Resolving deltas: 100% (3710/3710), done.
Submodule path 'docs': checked out 'f3746d4fcda2dc12d7f1120d55c17f3b52c0550e'
Cloning into fuel/core...
remote: Counting objects: 20958, done.
remote: Compressing objects: 100% (6266/6266), done.
remote: Total 20958 (delta 14615), reused 20579 (delta 14278)
Receiving objects: 100% (20958/20958), 3.25 MiB | 283 KiB/s, done.
Resolving deltas: 100% (14615/14615), done.
Submodule path 'fuel/core': checked out 'd95fbfec3fe2f791fead4eeb9a37fcd631009479'
Cloning into fuel/packages/auth...
remote: Counting objects: 541, done.
remote: Compressing objects: 100% (384/384), done.
remote: Total 541 (delta 240), reused 453 (delta 157)
Receiving objects: 100% (541/541), 67.77 KiB | 76 KiB/s, done.
Resolving deltas: 100% (240/240), done.
Submodule path 'fuel/packages/auth': checked out '7a2c479263f768b6de8bffe43b1bd00fd2bbdd6d'
Cloning into fuel/packages/email...
remote: Counting objects: 273, done.
remote: Compressing objects: 100% (157/157), done.
remote: Total 273 (delta 114), reused 268 (delta 109)
Receiving objects: 100% (273/273), 42.33 KiB, done.
Resolving deltas: 100% (114/114), done.
Submodule path 'fuel/packages/email': checked out '0113f3c6596e5b3b97408607ddc033e3a7dc833a'
Cloning into fuel/packages/oil...
remote: Counting objects: 896, done.
remote: Compressing objects: 100% (393/393), done.
remote: Total 896 (delta 510), reused 849 (delta 471)
Receiving objects: 100% (896/896), 117.05 KiB | 134 KiB/s, done.
Resolving deltas: 100% (510/510), done.
Submodule path 'fuel/packages/oil': checked out 'da74ddc023871ef54a93fdcc541cbf2db95b73f3'
Cloning into fuel/packages/orm...
remote: Counting objects: 14408, done.
remote: Compressing objects: 100% (4310/4310), done.
remote: Total 14408 (delta 9975), reused 14305 (delta 9877)
Receiving objects: 100% (14408/14408), 2.07 MiB | 274 KiB/s, done.
Resolving deltas: 100% (9975/9975), done.
Submodule path 'fuel/packages/orm': checked out 'ad18b80efcc712e02143a14d6e0902aab25da475'
Cloning into fuel/packages/parser...
remote: Counting objects: 603, done.
remote: Compressing objects: 100% (303/303), done.
remote: Total 603 (delta 285), reused 571 (delta 254)
Receiving objects: 100% (603/603), 113.31 KiB | 137 KiB/s, done.
Resolving deltas: 100% (285/285), done.
Submodule path 'fuel/packages/parser': checked out '836c1ad77e631d47839630f3fa79b9dddc0b8091'
	Made writable: /Users/luosteve/FuelPower/fuel/app/cache
	Made writable: /Users/luosteve/FuelPower/fuel/app/logs
	Made writable: /Users/luosteve/FuelPower/fuel/app/tmp
	Made writable: /Users/luosteve/FuelPower/fuel/app/config
$ cd ~/FuelPower
#移除git 資料
$ rm -rf .git*
$ git init
#接著要取捨submodule的部份,將需要的加進去
#不需要的部份請依路徑刪除,如orm、auth
$ git submodule add git://github.com/fuel/core.git fuel/core
$ git submodule add git://github.com/fuel/oil.git fuel/packages/oil
$ git submodule add git://github.com/fuel/parser.git fuel/packages/parser
$ git submodule add git://github.com/fuel/email.git fuel/packages/email
$ git submodule add git://github.com/fuel/orm.git fuel/packages/orm
$ git submodule add git://github.com/fuel/auth.git fuel/packages/auth
 
#全部submodule一起切換版本的大絕,目前是1.1版
$ git submodule foreach git checkout origin/1.1/master
$ 
 
 
設定.gitignore
<pre lang="bash" line="1">
*~
*.bak
*.log
Thumbs.db
desktop.ini
.DS_Store
.buildpath
.project
.settings
.tmpoj
logs/*
cache/*
tmp/*
build
nbproject/
.idea
app/config/crypt.php
1
2
$ cd fuel
$ mv app ../

編輯public/index.php

1
2
3
define('APPPATH', realpath(__DIR__.'/../fuel/app/').DIRECTORY_SEPARATOR);
//改為
define('APPPATH', realpath(__DIR__.'/../app/').DIRECTORY_SEPARATOR);
1
2
3
4
5
6
7
$ cd ../
$ cd app
$ mv cache ../
$ mv tmp ../
$ mv log ../
$ git add .
$ git commint -m 'init project'

完成後看起來是這樣.

剩下 build.xml 還不會調整.
剛進去不要太急

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *