Name

touch

Synopsis

bool touch(string path[, int touch_time[, int access_time]])

Sets the modification date of path to touch_time (a Unix timestamp value) and the access time of path to access_time. If not specified, touch_time defaults to the current time, while access_time defaults to touch_time (or the current time if that value is also not supplied). If the file does not exist, it is created. Returns true if the function completed without error and false if an error occurred.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.