- Issue created by @shenzhuxi
The core/assets/scaffold/files/ht.router.php file can only be used in root directory as the usage in document "php -S localhost:8888 .ht.router.php" and will have problems with "php -S localhost:8000 -t web/".
Example:
http://localhost:8000/admin/modules
Uncaught PHP Exception Twig\Error\LoaderError: "Template "core/modules/system/templates/input.html.twig"
Install Drupal following the standard "composer create-project drupal/recommended-project drupal" and try to run PHP build in server without cd to drupal/web/ directory "php -S localhost:8000 -t web/ web/.ht.router.php".
Use $_SERVER['DOCUMENT_ROOT'] instead of __DIR__ to support PHP document root directory parameter "-t".
< if (file_exists(__DIR__ . $url['path'])) {
---
> if (file_exists($_SERVER['DOCUMENT_ROOT'] . $url['path'])) {
Active
10.1 ✨
Last updated