September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool touch(string filepath, [int timestamp])
Touches a file.
Returns:
TRUE on success; FALSE on error
Description:
Sets the timestamp on a file to the specified UNIX timestamp. If the timestamp is not specified, the current timestamp is used. If the file doesn’t exist, a zero-byte file is created.
Example:
<?php
$file = "test_file";
touch ($file)
or die ("File '$file' says \"Don't touch me! Creep...\"");
?>
|
Read now
Unlock full access