Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to check ia folder if no have files in php

<?php
    $pid = $_GET["prodref"];
    $dir = '/assets/'.$pid.'/v';
    $q = count(glob("$dir/*")) == 0;

    if ($q) {
        echo "the folder is empty"; 
    } else {
        echo "the folder is NOT empty";
    }
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #ia #folder #files #php
ADD COMMENT
Topic
Name
9+2 =