admin管理员组

文章数量:1421500

I am using CraftCMS, and my file structure is this -

root folder

-craft

-httpdocs

Inside the 'craft' folder there is a config.php file where I need to set the path and site URL. It looks like this -

    'siteUrl' => [
        'en_ca' => '',
        'fr_ca' => '',
    ],
     'environmentVariables' => [
      'basePath' => '../httpdocs',
      'baseUrl'  => '',
    ]

Since the path for this file is inside the craft folder, /craft/config.php and it needs to navigate to /httpdocs inside the root, I use ../

This works fine for website in this example, but when I go to website/fr for the French site there is an error that it cannot find ../httpdocs

If I change the path to ../../httpdocs then website/fr loads correctly, but of course website does not

How can I update the path so it works for both?

本文标签: craftcmsHow to correctly set path for a folder outside the rootStack Overflow