超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<readlinkrename>
Last updated: Fri, 22 Jun 2007

realpath

(PHP 4 , PHP 5)

realpath -- 返回规范化的绝对路径名

说明

string realpath ( string path)

realpath() 扩展所有的符号连接并且处理输入的 path 中的 '/./', '/../' 以及多余的 '/' 并返回规范化后的绝对路径名。返回的路径中没有符号连接,'/./' 或 '/../' 成分。

realpath() 失败时返回 FALSE,例如如果文件不存在的话。

例子 1. realpath() 例子

<?php
$real_path
= realpath ("../../index.php");
?>

参见 basename()dirname()pathinfo()




add a note add a note User Contributed Notes
realpath
jerome at dot451 dot com
29-Aug-2000 03:03
mkdir (and realpath) did not work because i'd used virtual() function to replace server side include in my file.
And i've just seen that virtual() function changes the current directory ... that's why !

jerome ;)

<readlinkrename>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22