Pico/index.php

32 lines
787 B
PHP
Raw Normal View History

2012-04-04 13:45:09 +00:00
<?php
2015-11-27 18:45:21 +00:00
// check PHP version
if (version_compare(PHP_VERSION, '5.3.6', '<')) {
die('Sorry, Pico requires PHP 5.3.6 or above to run!');
}
2015-10-09 15:39:56 +00:00
// load dependencies
2015-11-27 18:49:53 +00:00
if(is_file(__DIR__ . '/vendor/autoload.php')) {
// composer root package
require_once(__DIR__ . '/vendor/autoload.php');
} elseif(is_file(__DIR__ . '/../../../vendor/autoload.php')) {
// composer dependency package
require_once(__DIR__ . '/../../../vendor/autoload.php');
} else {
2015-11-27 18:49:53 +00:00
die("Cannot find `vendor/autoload.php`. Run `composer install`.");
}
2015-10-09 15:39:56 +00:00
// instance Pico
$pico = new Pico(
2015-10-09 15:39:56 +00:00
__DIR__, // root dir
'config/', // config dir
'plugins/', // plugins dir
'themes/' // themes dir
);
2015-10-09 15:39:56 +00:00
// override configuration?
// $pico->setConfig(array());
// run application
echo $pico->run();