Voting

: four minus one?
(Example: nine)

The Note You're Voting On

picek dot jaroslav at protonmail dot com
1 year ago
I have found out that setting a negative *mtime* deletes the file. The following code always deletes the file at $path while $touch returns true.

<?php
$path
= '/folder/file';
$timestamp = -1;

$touch = touch($path, $timestamp);
?>

Running PHP 7.4.5

<< Back to user notes page

To Top