Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
b97954d69efa7d311f4c2e1cb0b2f358ef8bdf6c
1 parent
83ec7d80
do add static path to save css js images resource
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
5 deletions
README.md
compile/m.yohobuy.com/d8319b3f553ac1c54160add87943f697.php → compile/m.yohobuy.com/8a89fe340f3f109bfeabc18d396708ef.php
library/Plugin/TemplateLayout.php
yohobuy/m.yohobuy.com/configs/application.developer.ini
yohobuy/m.yohobuy.com/configs/application.production.ini
yohobuy/m.yohobuy.com/configs/application.testing.ini
README.md
View file @
b97954d
...
...
@@ -18,6 +18,7 @@ README.md 可以添加一些访问资料的快捷方式(索引),可以是
| framework | 框架目录 | 存放框架代码,方便多个项目复用 |
| library | 核心库目录 | 存放业务核心代码,方便多个项目复用 |
| script | 脚本目录 | 存放业务相关的数据库表结构及服务器配置等 |
| static | 静态资源目录 | 存放css、js、图片等静态的资源 |
| template | 模板目录 | 存放前端的模板文件,由前端维护 |
| tests | 测试用例目录 | 存放测试用例文件 |
| yohobuy | 代码目录 | 存放后端业务相关的代码 |
...
...
compile/m.yohobuy.com/
d8319b3f553ac1c54160add87943f697
.php → compile/m.yohobuy.com/
8a89fe340f3f109bfeabc18d396708ef
.php
View file @
b97954d
library/Plugin/TemplateLayout.php
View file @
b97954d
...
...
@@ -74,7 +74,7 @@ class TemplateLayout implements View_Interface
$config
=
Application
::
app
()
->
getConfig
()
->
get
(
'application'
);
$tplExt
=
$config
->
template
->
ext
;
$viewPath
=
$config
->
template
->
path
;
$viewName
=
$viewPath
.
'/'
.
$request
->
module
.
'/'
.
$request
->
controller
.
'/'
.
$tpl
.
'.'
.
$tplExt
;
$viewName
=
$viewPath
.
'/'
.
$request
->
module
.
'/'
.
$request
->
controller
.
'/'
.
$tpl
.
$tplExt
;
// 判断视图模板文件是否存在, 不存在则直接返回空
if
(
!
file_exists
(
$viewName
))
{
return
''
;
...
...
@@ -102,7 +102,7 @@ class TemplateLayout implements View_Interface
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
'flags'
=>
LightnCandy
::
FLAG_MUSTACHE
|
LightnCandy
::
FLAG_HANDLEBARS
,
// 使用MUSTACHE和HANDLEBARS的模板格式
'basedir'
=>
array
(
$config
->
template
->
partials
),
// 模板里使用 {{> partial_name}} 时查找的目录
'fileext'
=>
array
(
'.'
.
$tplExt
),
// 允许查找文件的后缀
'fileext'
=>
array
(
$tplExt
),
// 允许查找文件的后缀
'lcrun'
=>
'Plugin\LCRun3'
,
// 指定编译模板的runtime
));
// 文件流方式读取PHP方法
...
...
yohobuy/m.yohobuy.com/configs/application.developer.ini
View file @
b97954d
...
...
@@ -44,4 +44,4 @@ application.dispatcher.catchException = True
application.template.compile
=
ROOT_PATH "/compile/m.yohobuy.com"
application.template.path
=
ROOT_PATH "/template/m.yohobuy.com/actions"
application.template.partials
=
ROOT_PATH "/template/m.yohobuy.com/partials"
application.template.ext
=
"phtml"
\ No newline at end of file
application.template.ext
=
".phtml"
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/application.production.ini
View file @
b97954d
...
...
@@ -44,4 +44,4 @@ application.dispatcher.catchException = False
application.template.compile
=
ROOT_PATH "/compile/m.yohobuy.com"
application.template.path
=
ROOT_PATH "/template/m.yohobuy.com/actions"
application.template.partials
=
ROOT_PATH "/template/m.yohobuy.com/partials"
application.template.ext
=
"phtml"
\ No newline at end of file
application.template.ext
=
".phtml"
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/configs/application.testing.ini
View file @
b97954d
...
...
@@ -44,4 +44,4 @@ application.dispatcher.catchException = True
application.template.compile
=
ROOT_PATH "/compile/m.yohobuy.com"
application.template.path
=
ROOT_PATH "/template/m.yohobuy.com/actions"
application.template.partials
=
ROOT_PATH "/template/m.yohobuy.com/partials"
application.template.ext
=
"phtml"
\ No newline at end of file
application.template.ext
=
".phtml"
\ No newline at end of file
...
...
Please
register
or
login
to post a comment