From 61d78ae847b6925c280b30fcf781b88f7ba11b1e Mon Sep 17 00:00:00 2001 From: gravel Date: Fri, 19 Jan 2024 15:27:46 +0000 Subject: [PATCH] docs: clarify include paths --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 54edf6c..0c5d6f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,6 +40,11 @@ Recommended: - Use `doxygen` (or `make docs`) to generate documentation you can reference when developing. +#### Note on include paths + +The current working directory of all entrypoints in the `sites` directory is anchored to `sites` itself. +This ensures that references to components are not broken when the page changes locations. For example, `require '+getenv.php';` works in both `index.php` and `about/index.php`. However, as a result, files included from such endpoints (even from the `php/` subtree) may have their parent folders shadowed when trying to use `include` themselves. Files in the same folder and in subfolders can be included, however. How PHP's `include` fallback mechanism implies this behavior is unclear. + ### Running your own copy - point your webserver at the [`output`](output/) folder