Created
September 29, 2012 20:24
-
-
Save wesleybliss/3805101 to your computer and use it in GitHub Desktop.
Translate UNC Delimiters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Translate a path to match host OS | |
* | |
* @param string $path Path or URI to be translated | |
* @return string Translated path | |
*/ | |
function translate_UNC_delimiters( $path ) { | |
$path = str_replace( '\\', DIRECTORY_SEPARATOR, $path ); | |
return str_replace( '/', DIRECTORY_SEPARATOR, $path ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment