2015-11-27 19:56:28 +01:00
|
|
|
<?php // @codingStandardsIgnoreFile
|
2017-10-19 22:26:43 +02:00
|
|
|
/**
|
|
|
|
* This file is part of Pico. It's copyrighted by the contributors recorded
|
|
|
|
* in the version control history of the file, available from the following
|
|
|
|
* original location:
|
|
|
|
*
|
|
|
|
* <https://github.com/picocms/Pico/blob/master/index.php>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
* License-Filename: LICENSE
|
|
|
|
*/
|
2015-11-27 19:45:21 +01:00
|
|
|
|
2015-10-09 09:39:56 -06:00
|
|
|
// load dependencies
|
2016-01-07 03:00:21 +01:00
|
|
|
if (is_file(__DIR__ . '/vendor/autoload.php')) {
|
2015-11-27 19:49:53 +01:00
|
|
|
// composer root package
|
|
|
|
require_once(__DIR__ . '/vendor/autoload.php');
|
2016-01-07 03:00:21 +01:00
|
|
|
} elseif (is_file(__DIR__ . '/../../../vendor/autoload.php')) {
|
2015-11-27 19:49:53 +01:00
|
|
|
// composer dependency package
|
|
|
|
require_once(__DIR__ . '/../../../vendor/autoload.php');
|
2015-11-27 02:16:06 -02:00
|
|
|
} else {
|
2019-10-01 13:29:06 +02:00
|
|
|
die(
|
|
|
|
"Cannot find 'vendor/autoload.php'. If you're using a composer-based Pico install, run `composer install`. "
|
|
|
|
. "If you're rather trying to use one of Pico's pre-built release packages, make sure to download Pico's "
|
|
|
|
. "latest release package named 'pico-release-v*.tar.gz' (don't download a source code package)."
|
|
|
|
);
|
2015-11-27 02:16:06 -02:00
|
|
|
}
|
2015-10-09 09:39:56 -06:00
|
|
|
|
|
|
|
// instance Pico
|
2015-10-01 15:05:50 +02:00
|
|
|
$pico = new Pico(
|
2015-10-09 09:39:56 -06:00
|
|
|
__DIR__, // root dir
|
|
|
|
'config/', // config dir
|
|
|
|
'plugins/', // plugins dir
|
|
|
|
'themes/' // themes dir
|
2015-10-01 15:05:50 +02:00
|
|
|
);
|
2015-10-09 09:39:56 -06:00
|
|
|
|
|
|
|
// override configuration?
|
2015-11-27 19:40:26 +01:00
|
|
|
//$pico->setConfig(array());
|
2015-10-09 09:39:56 -06:00
|
|
|
|
|
|
|
// run application
|
2015-10-01 15:05:50 +02:00
|
|
|
echo $pico->run();
|