Question : php check if folder empty
Answered by : quin-pullens
<?php $dir = 'directory'; // dir path assign here echo (count(glob("$dir/*")) === 0) ? 'Empty' : 'Not empty';
?>
Source : https://stackoverflow.com/questions/7497733/how-can-i-use-php-to-check-if-a-directory-is-empty | Last Update : Mon, 10 Jan 22