seacms/index.php
2023-02-22 11:28:37 +01:00

33 lines
614 B
PHP

<?php
/**
* SPDX-License-Identifier: EUPL-1.2
* Authors: see /README.md
*/
if (is_file(__DIR__ . '/vendor/autoload.php')) {
include_once(__DIR__ . '/vendor/autoload.php');
}
try {
// instance Pico
$pico = new Pico(
__DIR__, // root dir
'content/', // config dir
'vendor/picocms/plugins/', // plugins dir
'vendor/picocms/themes/' // themes dir
);
// run application
$output = $pico->run();
} catch (Throwable $th) {
$output = <<<HTML
<div style="color:red;">
Exception : {$th->__toString()}
</div>
HTML;
}
echo $output;