开发者

How to identify that the string is a path to any file, using PHPcode?

开发者 https://www.devze.com 2022-12-30 12:04 出处:网络
Using P开发者_如何学GoHP, How to identify that the string is a path to any file?http://pt.php.net/is_file

Using P开发者_如何学GoHP, How to identify that the string is a path to any file?


http://pt.php.net/is_file

$path = 'string';
if(is_file($path)){
  // look, it's a file!
}


is_file($filename)
is_dir($filename)

Will return true if the string points to an existing file or directory.

0

精彩评论

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