Returns the absolute pathname:
<?php
echo realpath("test.txt");
?>
The output of the code above will be:
C:\Inetpub\testweb\test.txt
The realpath() function returns the absolute pathname.
This function removes all symbolic links (like '/./', '/../' and extra '/') and returns the absolute pathname.
realpath(
path)
Parameter | Description |
---|---|
path | Required. Specifies the path to check |
Return Value: | The absolute pathname on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3: PHP 5.2.1: |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!