如何找出要在文件中使用的 Joomla 根目录?我尝试了以下没有运气:
$path = JPATH_COMPONENT;
//Gives component root
$path = JURI::root();
//Gives absolute path, can't be used for some reason (http://www.site.com)
$path = $_SERVER['DOCUMENT_ROOT'];
//Gives public_html folder, but if someone installs joomla in a directory and not in root, it wrecks the whole thing
有没有办法只找到网站的 joomla 根目录?谢谢。