You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PlexShare/fuel/packages/oil/phpserver.php

39 lines
793 B

7 years ago
<?php
/**
* Fuel
*
* Fuel is a fast, lightweight, community driven PHP5 framework.
*
* @package Fuel
* @version 1.8
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2016 Fuel Development Team
* @link http://fuelphp.com
*/
// determine the file we're loading, we need to strip the query string for that
if (isset($_SERVER['SCRIPT_NAME']))
{
$file = $_SERVER['DOCUMENT_ROOT'].$_SERVER['SCRIPT_NAME'];
}
else
{
$file = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
if (($pos = strpos($file, '?')) !== false)
{
$file = substr($file, 0, $pos);
}
}
if (file_exists($file))
{
// bypass existing file processing
return false;
}
else
{
// route requests though the normal path
include $_SERVER['DOCUMENT_ROOT'].'/index.php';
}