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

查看所有标签

The Shallows

The Shallows

Nicholas Carr / W. W. Norton & Company / 2010-6-15 / USD 26.95

"Is Google making us stupid?" When Nicholas Carr posed that question, in a celebrated Atlantic Monthly cover story, he tapped into a well of anxiety about how the Internet is changing us. He also crys......一起来看看 《The Shallows》 这本书的介绍吧!

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

RGB HEX 互转工具

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

各进制数互转换器

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

正则表达式在线测试