Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 19752 программиста и 1623 робота. Сейчас ищут 1756 программистов ...

File::isAbsolute()

Вернуться к: File

File::isAbsolute()

File::isAbsolute() – checks wether the given path is an absolute path

Synopsis

require_once 'File.php';

bool File::isAbsolute ( string $path )

This method checks whether the supplied path is an absolute path (eg. "/foo/bar" or "C:\foo\bar").

Parameter

string $path - the path the will be checked.

Return value

This method returns TRUE if the path is absolute, FALSE otherwise.

Note

This function can be called statically.

Example

Using File::isAbsolute()

<?php
require_once 'File.php';

if (
File::isAbsolute("/usr/local") {
 echo 
"Path is absolute";
} else {
 echo 
"Path isn't absolute";
}
?>

This short example will output the string 'Path is absolute'.



Вернуться к: File

© 2025 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware