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

How do I call php in another directory

Discussion in 'XenForo Development Discussions' started by LPH, Nov 3, 2012.

  1. LPH

    LPH Well-Known Member

    <?php include('header.php');?>
    <?php include('connect.php');?>
    <?php require_once('auth.php');?>
    The above code works when I am in the /research directory. A XenForo page is created, this code is placed in the Page Options. Obviously the code isn't directing this page to the /research page.

    Since I'm still learning php .. .. can someone direct me to the easiest way to handle this directory challenge. Should I simply add

    <?php include('/research/header.php');?>
    <?php include('/research/connect.php');?>
    <?php require_once('/research/auth.php');?>
    There must be a way to do a path variable ... (um, right words?).

    Thanks for any guidance.
  2. James

    James Well-Known Member

  3. LPH

    LPH Well-Known Member

    This may be more appropriate. Since it is in the middle of the night and this woke me up... LOL.

     define('APP_DIR', '/research'); 
    I'm not sure that will work.

Share This Page