appleboy / CodeIgniter-App

Integrate RESTfull API, Base Model, Ion Auth module and template module
35 stars 20 forks source link

让app可以在子目录运行,views文件独立出来,可行吗? #1

Closed cssailing closed 9 years ago

cssailing commented 9 years ago

所有路径采用相对路行,这个能实现吗? 可以尝试ci3.0的index.php让views文件夹可以独立存放

appleboy commented 9 years ago

@cssailing 採用相對路徑?你是說 views 目錄嗎?

cssailing commented 9 years ago

整个app的,比如在子目录css和js的加载就会出错

appleboy commented 9 years ago

css 跟 js 就直接到 public/assets 底下吧,不要放到 application 內

請參考 https://github.com/appleboy/CodeIgniter-App/blob/master/application/controllers/topic.php#L16-L23

PS. 還是你把詳細需求描述一次吧?

cssailing commented 9 years ago

我想规划把views独立出来,做多views选择

appleboy commented 9 years ago

@cssailing 你可以試試看 https://github.com/appleboy/CodeIgniter-Template

可以多 view 選擇