summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cef03a4)
Move up front to allow usage in fail() error handler.
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
+function getoutput($blocks = [])
+{
+ $rep = [];
+ foreach ($blocks as $name => $html) {
+ $rep["[[$name]]"] = sprintf('<!--BLOCK:%s-->%s<!--/-->',
+ is_numeric($name) ? '' : "[[$name]]",
+ preg_replace('{<!--[^-]*-->}', '', $html)
+ );
+ }
+ return str_replace(array_keys($rep), array_values($rep), ob_get_clean());
+}
+
function fail($error)
{
http_response_code(500);
function fail($error)
{
http_response_code(500);
# execute dynamic code
if ($Page) {
# execute dynamic code
if ($Page) {
- function getoutput($blocks = [])
- {
- $rep = [];
- foreach ($blocks as $name => $html) {
- $rep["[[$name]]"] = sprintf('<!--BLOCK:%s-->%s<!--/-->',
- is_numeric($name) ? '' : "[[$name]]",
- preg_replace('{<!--[^-]*-->}', '', $html)
- );
- }
- return str_replace(array_keys($rep), array_values($rep), ob_get_clean());
- }
-
$found |= require "./$Page.php";
}
$found |= require "./$Page.php";
}