PHP touch() 函数

PHP 教程 · 2019-01-25 16:57:36

定义和用法

touch() 函数设置指定文件的访问和修改时间。

如果成功,该函数返回 TRUE。如果失败,则返回 FALSE。

语法


touch(filename,time,atime)


参数 描述
filename 必需。规定要接触的文件。
time 可选。设置时间。默认设置为当前系统时间。
atime 可选。设置访问时间。如果参数未设置或设置为与 time 参数相同,则默认设置为当前系统时间。

提示和注释

注释:如果指定的文件不存在,则会被创建。

实例


<?php
touch("test.txt");
?>


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

查看所有标签

Programming Collective Intelligence

Programming Collective Intelligence

Toby Segaran / O'Reilly Media / 2007-8-26 / USD 39.99

Want to tap the power behind search rankings, product recommendations, social bookmarking, and online matchmaking? This fascinating book demonstrates how you can build Web 2.0 applications to mine the......一起来看看 《Programming Collective Intelligence》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具