1
0
Fork 1

Make sites/ root for relative PHP site includes

pull/9/head
gravel 3 years ago
parent 55d5b43ca6
commit 16d70f3c6b
Signed by: gravel
SSH Key Fingerprint: SHA256:p4HP49CCk4YQMkJpWJ09L8peEPQWjERtdCRAFxPfbOY

@ -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);
} }