芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/cansahcab.gob.mx/libraries/vendor/typo3/phar-stream-wrapper/src/Helper.php
= 1) { // Rremove this and previous element array_splice($pathParts, $partCount - 1, 2); $partCount -= 2; $pathPartsLength -= 2; } elseif ($absolutePathPrefix) { // can't go higher than root dir // simply remove this part and continue array_splice($pathParts, $partCount, 1); $partCount--; $pathPartsLength--; } } } return $absolutePathPrefix . implode('/', $pathParts); } /** * Checks if the $path is absolute or relative (detecting either '/' or * 'x:/' as first part of string) and returns TRUE if so. * * @param string $path File path to evaluate * @return bool */ private static function isAbsolutePath($path): bool { // Path starting with a / is always absolute, on every system // On Windows also a path starting with a drive letter is absolute: X:/ return ($path[0] ?? null) === '/' || static::isWindows() && ( strpos($path, ':/') === 1 || strpos($path, ':\\') === 1 ); } /** * @return bool */ private static function isWindows(): bool { return stripos(PHP_OS, 'WIN') === 0; } }