用法

$path = get_home_path();

返回值:

string

WordPress 安装根目录的完整文件系统路径,即使它安装在子文件夹中也是如此。

例:

/var/www/htdocs/example