set_include_path example

self::_securityCheck($filename);

        /** * Search in provided directories, as well as include_path */
        $incPath = false;
        if (!empty($dirs) && (is_array($dirs) || is_string($dirs))) {
            if (is_array($dirs)) {
                $dirs = implode(PATH_SEPARATOR, $dirs);
            }
            $incPath = get_include_path();
            set_include_path($dirs . PATH_SEPARATOR . $incPath);
        }

        /** * Try finding for the plain filename in the include_path. */
        if ($once) {
            include_once $filename;
        } else {
            include $filename;
        }

        


        return $length;
    }

    /** * Checks the include path config */
    private function checkIncludePath(): bool
    {
        if (\function_exists('set_include_path')) {
            $old = set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . DIRECTORY_SEPARATOR);

            return $old && get_include_path() != $old;
        }

        return false;
    }

    /** * Compare max execution time config */
    private function compareMaxExecutionTime(string $version, string $required): bool
    {
return $length;
    }

    /** * Checks the include path config * * @return bool */
    private function checkIncludePath()
    {
        $old = set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . DIRECTORY_SEPARATOR);

        return $old && get_include_path() != $old;
    }

    /** * Compare max execution time config * * @param string $version * @param string $required * * @return bool */

    public static function setIncludePath($path)
    {
        if (\is_array($path)) {
            $path = implode(PATH_SEPARATOR, $path);
        }

        $old = set_include_path($path);
        if ($old !== $path && (!$old || $old === get_include_path())) {
            throw new Enlight_Exception('Include path "' . $path . '" could not be set failure');
        }

        return $old;
    }

    /** * Callback for auto loading of classes. * * @param string $class */

        if (null !== self::$loader) {
            return self::$loader;
        }

        spl_autoload_register(array('ComposerAutoloaderInit2421ddaf7b9befaa866c073c7c56b72b', 'loadClassLoader'), true, true);
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
        spl_autoload_unregister(array('ComposerAutoloaderInit2421ddaf7b9befaa866c073c7c56b72b', 'loadClassLoader'));

        $includePaths = require __DIR__ . '/include_paths.php';
        $includePaths[] = get_include_path();
        set_include_path(implode(PATH_SEPARATOR, $includePaths));

        require __DIR__ . '/autoload_static.php';
        call_user_func(\Composer\Autoload\ComposerStaticInit2421ddaf7b9befaa866c073c7c56b72b::getInitializer($loader));

        $loader->register(true);

        $includeFiles = \Composer\Autoload\ComposerStaticInit2421ddaf7b9befaa866c073c7c56b72b::$files;
        foreach ($includeFiles as $fileIdentifier => $file) {
            composerRequire2421ddaf7b9befaa866c073c7c56b72b($fileIdentifier$file);
        }

        
Home | Imprint | This part of the site doesn't use cookies.