Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3442214
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:38:31+00:00 2026-05-18T08:38:31+00:00

So first check out my line of code below: $env_config[‘tmpl_file_basepath’] = DOC_ROOT . ‘/tpl/’;

  • 0

So first check out my line of code below:

$env_config['tmpl_file_basepath'] = DOC_ROOT . '/tpl/';

DOC_ROOT is equal to $_SERVER[‘DOCUMENT_ROOT’] which is equal to /var/www/example.com/html/

So my code above would set that path to: /var/www/example.com/html/tpl/

However the tpl folder should actually be in /var/www/example.com/

So first is there any server variable that is equal to the domain root, rather than the public directory root? And if not, is there a way to go up a diretory such as:

$env_config['tmpl_file_basepath'] = DOC_ROOT . '../tpl/';

I tried that but instead it just did /var/www/example.com/html/../tpl/

If this site was just in one location, I could simply manually type in the server path, but this is a config file that is used on local, dev, and live so I can’t have it hardcoded. I’ve gotten everything else working. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:38:32+00:00Added an answer on May 18, 2026 at 8:38 am

    To go up one directory, you can use dirname:

    $env_config['tmpl_file_basepath'] = dirname(DOC_ROOT) . '/tpl/';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First check out this code. I seems like it should work for me, but
So this question will get technical – eventually – but first check out Hanselminutes
How do you check in code for the first time in Team Foundation Server?
When I need some complex algorithm I first check if there's anything relevant already
I need to send hundreds of newsletters, but would like to check first if
I'm soon going to check in the very first commit of a new Java
First, let's get the security considerations out of the way. I'm using simple authentication
I have a standalone Java application below that is: Generating a random line Applied
This is another of those SCJP questions. The code below prints Alpha:fooBeta:fooBeta:barBeta:bar , and
I need to retrieve the PIN from a notepad file (below) and check it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.