如何获取主文件夹的根目录?例如,我在此位置运行文件:
public_html/admin/user/etc/index.php
我想包含来自的文件
public_html/includes/user/etc/function.php
所以我想做这样的事情:
include(get_first_default_folder().'includes/user/etc/function.php');
替代:
include('../../../includes/user/etc/function.php');