Pannous

Pannous Git Source Tree

Root/oil

1<?php
2/**
3 * Fuel is a fast, lightweight, community driven PHP5 framework.
4 *
5 * @package Fuel
6 * @version 1.8
7 * @author Fuel Development Team
8 * @license MIT License
9 * @copyright 2010 - 2016 Fuel Development Team
10 * @link http://fuelphp.com
11 */
12
13/**
14 * Refuse to run oil when called from php-cgi !
15 */
16if (substr(php_sapi_name(), 0, 3) == 'cgi')
17{
18 die("The use of oil is not supported when running php-cgi. Oil needs php-cli to function!\n\n");
19}
20
21/**
22 * Set error reporting and display errors settings. You will want to change these when in production.
23 */
24error_reporting(-1);
25ini_set('display_errors', 1);
26
27/**
28 * Website document root
29 */
30define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR);
31
32/**
33 * Path to the application directory.
34 */
35define('APPPATH', realpath(__DIR__.'/fuel/app/').DIRECTORY_SEPARATOR);
36
37/**
38 * Path to the default packages directory.
39 */
40define('PKGPATH', realpath(__DIR__.'/fuel/packages/').DIRECTORY_SEPARATOR);
41
42/**
43 * The path to the framework core.
44 */
45define('COREPATH', realpath(__DIR__.'/fuel/core/').DIRECTORY_SEPARATOR);
46
47// Get the start time and memory for use later
48defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true));
49defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage());
50
51// Load in the Fuel autoloader
52if ( ! file_exists(COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'))
53{
54 die("No composer autoloader found. Please run composer to install the FuelPHP framework dependencies first!\n\n");
55}
56
57// Load in the Fuel autoloader
58require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php';
59class_alias('Fuel\\Core\\Autoloader', 'Autoloader');
60
61// Boot the app
62require APPPATH.'bootstrap.php';
63
64// Load oil package
65\Package::load('oil');
66
67// Fire up the command line interfact
68\Oil\Command::init($_SERVER['argv']);

Archive Download this file

Branches