In case you run into a cross-platform issue when retrieving the sub-path , use FilesystemIterator::UNIX_PATHS flag to fix it
(PHP 5 >= 5.1.0)
RecursiveDirectoryIterator::getSubPathname — Get sub path and name
Gets the sub path and filename.
This function is currently not documented; only its argument list is available.
This function has no parameters.
The sub path (sub directory) and filename.