1
0
Fork 1

Make sites/ root for relative PHP site includes

remotes/1715175271555336803/main
gravel 3 years ago
parent bb359aa3f3
commit a47ccbe4d2
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -26,7 +26,9 @@
// This works? Yes, yes it does. // This works? Yes, yes it does.
// We do this to isolate the environment and include-once triggers, // We do this to isolate the environment and include-once triggers,
// otherwise we could include the documents in an ob_* wrapper. // 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); file_put_contents($docpath, $document);
} }