Search
 
SCRIPT & CODE EXAMPLE
 

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";
    }
?>
Comment

PREVIOUS NEXT
Code Example
Php :: check multiple roles with Blade directive @can? 
Php :: no routes.php in http folder 
Php :: php huruf besar di awal 
Php :: laravel cookie (flash meesage for time) 
:: database connection in pdo php 
Php :: codeigniter 4 radio button isset 
Php :: php url variable xss sanitize 
Php :: Remove the Breadcrumb on the Shop Page 
Php ::  
Php :: How to create routes in the codeigniter 
Php :: remove MainWP Child phpmyadmin 
Php :: php create empty array with size 
Php :: where statement multiple argument in codeigniter 
Php :: what is composer in laravel 
Php :: close route in laravel 
Php :: laravel self 
Php :: distinct in laravel 8 
Php :: laravel-check-if-related-model-exists 
Php :: php json decode 
Php :: custom blade 
Php :: php call non static method from static method 
::  
Php :: simple bindings laravel 
Php :: laravel pivot select fields 
Php :: symfony get api data 
:: lookup token information in vault 
:: wp_mail multiple recipients 
Php :: month php written out 
Php :: session in laravel 
:: return single row from eloquent all collection laravel 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =