PHP realpath() 函数

PHP 教程 · 2019-01-25 14:44:14

定义和用法

realpath() 函数返回绝对路径。

该函数删除所有符号连接(比如 '/./', '/../' 以及多余的 '/'),并返回绝对路径名。

如果失败,该函数返回 FALSE。

语法


realpath(path)


参数 描述
path 必需。规定要检查的路径。

实例


<?php
echo realpath("test.txt");
?> 

上面的代码将输出:


C:Inetpubtestwebtest.txt


点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Learn Python 3 the Hard Way

Learn Python 3 the Hard Way

Zed A. Shaw / Addison / 2017-7-7 / USD 30.74

You Will Learn Python 3! Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring t......一起来看看 《Learn Python 3 the Hard Way》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试