当前位置: 首页> 函数类别大全> realpath

realpath

返回规范化的绝对路径名
名称:realpath
分类:文件系统
所属语言:php
一句话介绍:返回绝对路径名。

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">realpath</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"test.txt"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

C:\Inetpub\testweb\test.txt
同类函数
  • 将数据写入文件  file_put_contents

    file_put_contents

    将数据写入文件
  • 判断文件是否是通过 HTTP POST 上传的  is_uploaded_file

    is_uploaded_file

    判断文件是否是通过HTTPPOST上传的
  • 同步对文件的更改(包括元数据)  fsync

    fsync

    同步对文件的更改(包括元数据)
  • 判断给定文件名是否是一个目录  is_dir

    is_dir

    判断给定文件名是否是一个目录
  • 轻便的咨询文件锁定  flock

    flock

    轻便的咨询文件锁定
  • 清除文件状态缓存  clearstatcache

    clearstatcache

    清除文件状态缓存
  • 从文件指针中读取一行  fgets

    fgets

    从文件指针中读取一行
  • 在文件指针中定位  fseek

    fseek

    在文件指针中定位