think icon indicating copy to clipboard operation
think copied to clipboard

6.0 建议把目录增加齐全

Open hulang opened this issue 6 years ago • 6 comments

https://www.kancloud.cn/manual/thinkphp6_0/1037487 还少了:extend,route,view 3个目录,一劳永逸下!!!

hulang avatar Jul 18 '19 08:07 hulang

https://www.kancloud.cn/manual/thinkphp6_0/1037487 还少了:extend,route,view 3个目录,一劳永逸下!!!

框架已包含有这几个目录

anydson avatar Aug 04 '19 06:08 anydson

@anydson

目录位置 目录说明 获取方法
根目录 项目所在的目录,默认自动获取,可以在入口文件实例化App类的时候传入。 App::getRootPath()
基础目录 根目录下的app目录 App::getBasePath()
应用目录 当前应用所在的目录,如果是单应用模式则同基础目录,如果是多应用模式,则是app/应用子目录 App::getAppPath()
配置目录 根目录下的config目录 App::getConfigPath()
运行时目录 框架运行时的目录,单应用模式就是根目录的runtime目录,多应用模式为runtime/应用子目录 App::getRuntimePath()
核心类库目录 框架核心类库的think目录 App::getThinkPath()

我说的是这个。。。

hulang avatar Aug 04 '19 07:08 hulang

这些目录你要来干嘛呢 手动加载文件么?

liu21st avatar Aug 04 '19 15:08 liu21st

@liu21st 一劳永逸啊,每次都得App::getRootPath() + 上面的3个目录的名字

hulang avatar Aug 04 '19 15:08 hulang

用不上的路径要来干嘛

liu21st avatar Aug 05 '19 09:08 liu21st

@liu21st 用不上,就不会发帖了。。

hulang avatar Aug 06 '19 09:08 hulang