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

38 lines
825 B

<?php
/**
* Fuel is a fast, lightweight, community driven PHP 5.4+ framework.
*
* @package Fuel
* @version 1.8.1
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2018 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
$_SERVER['SCRIPT_NAME'] = __FILE__;
include $_SERVER['DOCUMENT_ROOT'].'/index.php';
}