From 16d70f3c6b3a54e0e2b3a410a7e2b77624b200eb Mon Sep 17 00:00:00 2001 From: gravel Date: Sun, 22 Jan 2023 19:50:39 +0100 Subject: [PATCH] Make sites/ root for relative PHP site includes --- php/generate-html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/php/generate-html.php b/php/generate-html.php index d6bfb73..7df70db 100644 --- a/php/generate-html.php +++ b/php/generate-html.php @@ -26,7 +26,9 @@ // This works? Yes, yes it does. // We do this to isolate the environment and include-once triggers, // otherwise we could include the documents in an ob_* wrapper. - $document = `php $phppath`; // should be identical to shell_exec("php $phppath") + + // Same as shell_exec, except we don't have to escape quotes. + $document = `cd "$TEMPLATES_ROOT"; php $phppath`; file_put_contents($docpath, $document); }