开发者

What is the difference between realpath() and is_dir() in php?

开发者 https://www.devze.com 2023-01-05 08:33 出处:网络
What is the difference between realpath($path) and is_dir($path)? I know realpath follows symbolic links, but is ther开发者_JAVA技巧e a performance difference between the two?Realpath returns the can

What is the difference between realpath($path) and is_dir($path)?

I know realpath follows symbolic links, but is ther开发者_JAVA技巧e a performance difference between the two?


Realpath returns the canonicalized actual pathname of a file on success, is_dir returns a boolean value of whether or not the file is a directory.

http://php.net/manual/en/function.is-dir.php
http://php.net/manual/en/function.realpath.php


How about looking at the manual.

realpath — Returns canonicalized absolute pathname

is_dir — Tells whether the filename is a directory

0

精彩评论

暂无评论...
验证码 换一张
取 消