function apache_request_path_() { if (!apache_is_rewrite_engine_on_()) { return default_request_path_(); } return apache_request_path_helper_(server_var_('REQUEST_URI'), uri_path_(server_var_('PHP_SELF'))); }
* Inertia is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * Inertia is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * To read the license please visit http://www.gnu.org/copyleft/gpl.html * * *-------10--------20--------30--------40--------50--------60---------72 */ define('INERTIA_WEB_SERVER', webserver_(server_var_('SERVER_SOFTWARE'))); require_webserver_adapter_(webserver_adapter_('default')); require_webserver_adapter_(webserver_adapter_(INERTIA_WEB_SERVER)); function webserver_($server_software) { $server_softwares = array('Apache' => 'apache', 'Microsoft-IIS' => 'iis', 'Microsoft-PWS' => 'pws', 'Xitami' => 'xitami', 'Zeus' => 'zeus', 'OmniHTTPd' => 'omnihttpd'); foreach ($server_softwares as $key => $value) { if (str_contains_($key, $server_software)) { return $value; } } return 'unknown'; } function require_webserver_adapter_($webserver_adapter) { if (file_exists($webserver_adapter)) {
* http://collaborationscience.com/ * * This file is part of Inertia. * * Inertia is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * Inertia is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * To read the license please visit http://www.gnu.org/copyleft/gpl.html * * *---------------------------------------------------------------------------- */ php_min_version_guard_('4.3.0'); function php_min_version_guard_($min_php_version) { $is_min_php_version = (function_exists('version_compare') and version_compare(PHP_VERSION, $min_php_version, '>=')); if (!$is_min_php_version) { echo "ERROR: Older version of PHP. Current version of PHP is " . PHP_VERSION . ". Please upgrade to PHP {$min_php_version}."; exit; } } require './bootstrap.php'; $response = bootstrap_inertia_(request_method_(server_var_('REQUEST_METHOD')), request_path_(webserver_specific_('request_path_')), $_GET, webserver_specific_('request_headers_'), request_body_(file_get_contents('php://input'))); flush_response_($response);
* your option) any later version. * * Inertia is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * To read the license please visit http://www.gnu.org/copyleft/gpl.html * * *-------10--------20--------30--------40--------50--------60---------72 */ define('INERTIA_SCHEME', uri_scheme_(server_var_('HTTPS'))); define('INERTIA_HOST', uri_host_(server_var_('HTTP_HOST'))); define('INERTIA_PORT', uri_port_(server_var_('HTTP_HOST'))); define('INERTIA_PATH', uri_path_(server_var_('PHP_SELF'))); define('INERTIA_ABSOLUTE_BASE_URI', uri_absolute_base_(INERTIA_SCHEME, INERTIA_HOST, INERTIA_PORT, INERTIA_PATH)); define('INERTIA_RELATIVE_BASE_URI', uri_relative_base_(INERTIA_PATH)); function uri_scheme_($https) { $ssl = !is_null($https) and is_equal_('on', $https); $scheme = $ssl ? 'https' : 'http'; return $scheme; } function uri_host_($http_host) { if (str_contains_(':', $http_host)) { $host = array_shift(explode(':', $http_host)); } else { $host = $http_host; }