You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
The only use cases I remember around App.webroot are when URL rewriting is off, and the application is in a subdirectory. Plugins are different because their static assets are either served by middleware or the webserver and deployment tooling.
The documentation shows them being essentially the same:
However,
wwwRoot
uses a path from paths.php wile webroot hard-codes the same directory in the config.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.The text was updated successfully, but these errors were encountered: