thinkphp6 App类的使用

        dump($this->app->getThinkPath());//获取核心框架目录
        dump($this->app->getRootPath());//获取应用根目录
        dump($this->app->getBasePath());//获取应用基础目录
        dump($this->app->getAppPath());//获取当前应用目录
        dump($this->app->getRuntimePath());//获取应用运行时目录

        dump($this->app->getBeginTime());//获取应用开启时间
        dump($this->app->getBeginMem());//获取应用初始内存占用


        dump($this->app->setRuntimePath());//设置runtime目录
        dump($this->app->setAppPath());//设置应用目录
        dump($this->app->setEnvName());//设置环境变量标识
        dump($this->app->setNamespace());//设置应用命名空间

.....还有更多api
THE END
喜欢就支持一下吧
点赞12 分享