src/Core/LTIX.php
public static function curPageUrlFolder() {
        $folder = self::curPageUrlBase() .  $_SERVER['REQUEST_URI'];
        $folder = self::removeQueryString($folder);
        if ( preg_match('/\/$/', $folder) ) return $folder;
        return dirname($folder);
    }
public static function curPageUrlFolder() {
        $folder = self::curPageUrlBase() .  $_SERVER['REQUEST_URI'];
        $folder = self::removeQueryString($folder);
        if ( preg_match('/\/$/', $folder) ) return $folder;
        return dirname($folder);
    }
public static function curPageUrlFolder ( ) { $ folder = self :: curPageUrlBase ( ) . $ _SERVER [ 'REQUEST_URI' ] ; $ folder = self :: removeQueryString ( $ folder ) ; if ( preg_match ( '/\/$/' , $ folder ) ) return $ folder ; return dirname ( $ folder ) ; }
curPageUrlFolder - Returns the URL to the folder currently executing

This is useful when rest-style files want to link back to "index.php"
Note - this will not go up to a parent.

URL                              Result
http://x.com/data/               http://x.com/data/
http://x.com/data/keys           http://x.com/data/
curPageUrlFolder - Returns the URL to the folder currently executing