在wordpress中访问我的网络根


Getting to my webroot in wordpress

我在Windows 8.1上使用WAMP。
我的网站位于: D:''program files''wamp''www''WEBSITE

在网站下是:

/img
/css
Several PHP webpage files including my site header and footer<
/BLOG <-- (wordpress)

我正在尝试在WordPress中使用我的页眉和页脚,所以我不得不将图像的头文件路径更改为从文档根目录开始的动态路径。

当我添加$_SERVER['DOCUMENT_ROOT']时,它从D:/...开始,当我尝试在WordPress中使用/作为webroot时,它从/BLOG而不是/WEBSITE开始。

如何让我的根/WEBSITE

get_option('url');包含WordPress中的Web根目录。

请参阅:http://codex.wordpress.org/Template_Tags/bloginfo 以获取更多选项(有很多可供选择..)

或者可能使用home_url().

请参阅: http://codex.wordpress.org/Function_Reference/home_url

从根开始的相对怎么样?

/../img/