Menu Samaritan's Purse

TOUCH

Sets access and modification time of file

SYNTAX

touch ( string $filename [, int $time = time() [, int $atime ]] ) : bool

PARAMETERS

filename

The name of the file being touched.

time

The touch time. If time is not supplied, the current system time is used.

atime

If present, the access time of the given filename is set to the value of atime. Otherwise, it is set to the value passed to the time parameter. If neither are present, the current system time is used.

RETURN

Returns TRUE on success or FALSE on failure.

EXAMPLES

1

access time and modification time set to current time

2

access time and modification time set to one hour in the past

3

access time set to two hours in the past and modification time set to one hour in the past

PHP