関数 wp_normalize_path()
定義ファイル :/blog/wp-includes/functions.php 9
wp_normalize_path()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | /** * Normalize a filesystem path. * * Replaces backslashes with forward slashes for Windows systems, and ensures * no duplicate slashes exist. * * @since 3.9.0 * * @param string $path Path to normalize. * @return string Normalized path. */ function wp_normalize_path( $path ) { $path = str_replace( '\\', '/', $path ); $path = preg_replace( '|/+|','/', $path ); return $path; } |