PHP file_exists() 函数

PHP 教程 · 2019-01-24 21:29:09

定义和用法

file_exists() 函数检查文件或目录是否存在。

如果指定的文件或目录存在则返回 TRUE,否则返回 FALSE。

语法


file_exists(path)


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

实例


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

上面的代码将输出:


1


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

查看所有标签

Implementing Responsive Design

Implementing Responsive Design

Tim Kadlec / New Riders / 2012-7-31 / GBP 27.99

New devices and platforms emerge daily. Browsers iterate at a remarkable pace. Faced with this volatile landscape we can either struggle for control or we can embrace the inherent flexibility of the w......一起来看看 《Implementing Responsive Design》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

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

在线 XML 格式化压缩工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具