Skip to content

Ambiguous difference between App.webroot and App.wwwRoot #838

Description

@othercorey

The documentation shows them being essentially the same:

     * - webroot - The webroot directory.
     * - wwwRoot - The file path to webroot.

        'webroot' => 'webroot',
        'wwwRoot' => WWW_ROOT,

However, wwwRoot uses a path from paths.php wile webroot hard-codes the same directory in the config.

/*
 * File path to the webroot directory.
 *
 * To derive your webroot from your webserver change this to:
 *
 * `define('WWW_ROOT', rtrim($_SERVER['DOCUMENT_ROOT'], DS) . DS);`
 */
define('WWW_ROOT', ROOT . DS . 'webroot' . DS);

When would you want the webroot separate from the path? Asset loading from plugins don't use either of these, but instead hard-code the directory name webroot/ in source.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions