Add index.php.dist

See https://github.com/picocms/Pico/issues/285#issuecomment-160130798
This commit is contained in:
Daniel Rudolf 2015-11-27 19:56:28 +01:00
parent abce8b84b8
commit 2535df7cfe
3 changed files with 22 additions and 7 deletions

View file

@ -29,6 +29,7 @@ before_deploy:
- deploy-phpdoc-release.sh
- composer install --no-dev --optimize-autoloader
- find vendor/ -type d -path 'vendor/*/*/.git' -print0 | xargs -0 rm -rf
- mv index.php.dist index.php
- tar -czf "pico-release-$TRAVIS_TAG.tar.gz" README.md LICENSE CONTRIBUTING.md CHANGELOG.md composer.json composer.lock config content-sample lib plugins themes vendor .htaccess index.php
deploy:

View file

@ -1,10 +1,4 @@
<?php
// @codingStandardsIgnoreFile
// check PHP version
if (version_compare(PHP_VERSION, '5.3.6', '<')) {
die('Sorry, Pico requires PHP 5.3.6 or above to run!');
}
<?php // @codingStandardsIgnoreFile
// load dependencies
if(is_file(__DIR__ . '/vendor/autoload.php')) {

20
index.php.dist Normal file
View file

@ -0,0 +1,20 @@
<?php
// check PHP version
if (version_compare(PHP_VERSION, '5.3.6', '<')) {
die('Pico requires PHP 5.3.6 or above to run');
}
// load dependencies
require_once(__DIR__ . '/vendor/autoload.php');
// instance Pico
$pico = new Pico(
__DIR__, // root dir
'config/', // config dir
'plugins/', // plugins dir
'themes/' // themes dir
);
// run application
echo $pico->run();