$ _SERVER ['document_root']? [英] $_SERVER['document_root']?

查看:137
本文介绍了$ _SERVER ['document_root']?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是否指向执行当前文件的目录?

is this pointing to the directory where the current file is executed?

推荐答案

否,它指向Web服务器的根目录-网站的最高文件夹.

No, it points to the root of your webserver - the topmost folder of your website.

如果要使用当前文件的目录,请使用:

If you want the directory of the current file, use:

dirname(__FILE__);

这篇关于$ _SERVER ['document_root']?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆