Jump to content

Recommended Posts

Posted

I'm using $config->paths->root to get the root domain of my site. It worked fine in my local dev environment but on my live server it returns '/var/www' rather than the actual directory '/var/www/my-site' . I'm pretty sure i've used it before with virtual domains so not sure what the issue is.

Posted

It works here (Apache) as expected. You could use regular PHP instead: 

echo $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']) . '/';

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...