PHP function touch()

Availability in PHP 4.0

Sets file access and modification time

Parameters

Parameter Data type Default value Note
$filename string not The name of the file you are touching.
$time int null, time of touch. If no time is given, the current system time is used.
$atime int null If specified, the time to access the specified filename is set to atime. Otherwise, it is set to time.

Return values

bool

Returns true on success, otherwise false on failure.

Other resources

Official documentation for the touch function

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.