1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XenForo_Helper_File or XenForo_Application to get path to root

Discussion in 'XenForo Development Discussions' started by LPH, Nov 28, 2013.

  1. LPH

    LPH Well-Known Member

    Hi,

    Are there documents or posts showing more information regarding this? A search on this site brings up 2010 discussions. A search in the code doesn't show anything obvious ... *

    Specifically, I'm trying to figure out how to get the XenForo root installation. I can get the data root

    Code:
    echo XenForo_Helper_File::getExternalDataPath();
    
    But I'd like to get the root and not the data path.

    Thank you.

    * Anything obvious ... like the $fileDir :(

    Code:
    XenForo_Application::initialize($fileDir......);
    
     
  2. xf_phantom

    xf_phantom Well-Known Member

    PHP:
    XenForo_Application::getInstance()->getRootDir();
     
  3. LPH

    LPH Well-Known Member

    Ugh. I thought this was tried but just added it in to the plugin and works.

    Thanks again xf. You are the best.
     

Share This Page