PHP 8.5.0 RC 1 available for testing

Voting

: max(eight, five)?
(Example: nine)

The Note You're Voting On

chris at vibenewmedia dot com
21 years ago
To delete all files of a particular extension, or infact, delete all with wildcard, a much simplar way is to use the glob function. Say I wanted to delete all jpgs .........

<?php

foreach (glob("*.jpg") as $filename) {
echo
"$filename size " . filesize($filename) . "\n";
unlink($filename);
}

?>

<< Back to user notes page

To Top