path_is_absolute [ WordPress Function ]
path_is_absolute ( $path )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: antispambot, the_title_attribute, wp_is_mobile, update_posts_count, wp_list_filter
Test if a give filesystem path is absolute ('/foo/bar', 'c:\windows').
Source
<?php
function path_is_absolute( $path ) {
// this is definitive if true but fails if $path does not exist or contains a symbolic link
if ( realpath($path) == $path )
return true;
if ( strlen($path) == 0 || $path[0] == '.' )
return false;
// windows allows absolute paths like this
if ( preg_match('#^[a-zA-Z]:\\\\#', $path) )
return true;
// a path starting with / or \ is absolute; anything else is relative
return ( $path[0] == '/' || $path[0] == '\\' );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- WordPress › Support » path_is_absolute() throwing errors after ...
Hello,. I just recently moved a wordpress installation from my MAMP local server to a web server. Everything is working fine except when in wp-admin i'm getting ...
wordpress.org - #17754 (preg_match() use is overkill in path_is_absolute ...
path_is_absolute() utilizes preg_match() to check if the first character of a path string is either of two possibilities. This is way overkill for such a simple case.
core.trac.wordpress.org - path_is_absolute() WordPress function reference, arguments and ...
Test if a give filesystem path is absolute ('/foo/bar', 'c:windows').
queryposts.com - _AssemblyLocation VSTO path is Absolute or Relative?
Ask a question. Monday, January 16, 2012 9:42 AM. Sign In to Vote. 0. Sign In to Vote. the custom document properties named _AssemblyLocation VSTO path ...
social.msdn.microsoft.com