Voting

: seven plus zero?
(Example: nine)

The Note You're Voting On

gecko4 at gmail dot com
18 years ago
Here is another way to test if a directory is empty, which I think is much simpler than those posted below:

<?php
$dir
= 'directory';
echo (
count(glob("$dir/*")) === 0) ? 'Empty' : 'Not empty';
?>

<< Back to user notes page

To Top