当前位置:编程学习 > php >>

PHP touch() 函数实例教程

PHP touch() 函数实例教程

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

此函数返回TRUE成功,或FALSE的失败。

语法

touch(filename,time,atime)
ParameterDescription
filenameRequired. Specifies the file to touch
timeOptional. Sets the time. The current system time is set by default
atimeOptional. Sets the access time. Default is the current system time if no parameters are set, or the same as the time parameter if that parameter is set

提示和说明
注意:如果指定的文件不存在,这将是创建。




例如

<?php
touch("test.txt");
?>
补充:Php教程,Php函数 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,