application/manage/logic/RuntimeLogic.php
public static function dirName($path = '/')
    {
        // 真实路径
        $path_runtime = realpath(RUNTIME_PATH);
        $path_list = dirname(realpath(RUNTIME_PATH . $path));
        
        // 上级路径
        if (strpos($path_list, $path_runtime) !== false) {
            return self::processDirName($path_list, $path_runtime);
        } else {
            return '/';
        }
    }
public static function dirName($path = '/')
    {
        // 真实路径
        $path_runtime = realpath(RUNTIME_PATH);
        $path_list = dirname(realpath(RUNTIME_PATH . $path));
        
        // 上级路径
        if (strpos($path_list, $path_runtime) !== false) {
            return self::processDirName($path_list, $path_runtime);
        } else {
            return '/';
        }
    }
public static function dirName ( $ path = '/' ) { // 真实路径 $ path_runtime = realpath ( RUNTIME_PATH ) ; $ path_list = dirname ( realpath ( RUNTIME_PATH . $ path ) ) ; // 上级路径 if ( strpos ( $ path_list , $ path_runtime ) !== false ) { return self :: processDirName ( $ path_list , $ path_runtime ) ; } else { return '/' ; } }
上级目录

@param string $path
@return string
上级目录