tp5.1取消了系统常量,改用Env类获取
5.1版本取消了所有的系统常量,原来的系统路径变量改为使用Env类获取(需要引入namespace think\facade\Env)
echo "app_path=========".Env::get('app_path')."</br>"; echo "root_path=========".Env::get('root_path')."</br>"; echo "think_path=========".Env::get('think_path')."</br>"; echo "config_path=========".Env::get('config_path')."</br>"; echo "extend_path=========".Env::get('extend_path')."</br>"; echo "vendor_path=========".Env::get('vendor_path')."</br>"; echo "runtime_path=========".Env::get('runtime_path')."</br>"; echo "route_path=========".Env::get('route_path')."</br>"; echo "module_path=========".Env::get('module_path')."</br>";
app_path=========/home/wwwroot/default/citygame/dragonfly/app/ root_path=========/home/wwwroot/default/citygame/dragonfly/ think_path=========/home/wwwroot/default/citygame/dragonfly/thinkphp/ config_path=========/home/wwwroot/default/citygame/dragonfly/config/ extend_path=========/home/wwwroot/default/citygame/dragonfly/extend/ vendor_path=========/home/wwwroot/default/citygame/dragonfly/vendor/ runtime_path=========/home/wwwroot/default/citygame/dragonfly/runtime/ route_path=========/home/wwwroot/default/citygame/dragonfly/route/ module_path=========/home/wwwroot/default/citygame/dragonfly/app/admin/
- 版权申明:此文如未标注转载均为本站原创,自由转载请表明出处《龙行博客》。
- 本文网址:https://www.liaotaoo.cn/203.html
- 上篇文章:tp5.1支付宝电脑网站支付遇到的坑
- 下篇文章:MongoDB设置访问权限、设置用户