neonwired Posted June 28, 2019 Posted June 28, 2019 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.
dragan Posted June 28, 2019 Posted June 28, 2019 It works here (Apache) as expected. You could use regular PHP instead: echo $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']) . '/';
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now