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 :: trova corrispondenza nella stringa php 
Php :: woocommerce function traduccion label 
Php :: AuthController 
Php :: guarded and fillable in laravel 
Php :: italic text in laravel notification 
Php :: comment blade php 
Php :: php encrypt password 
Php :: kill php-fpm inside docker 
Php :: laravel dirty words check 
Php :: extract in php 
Php :: remove laravel/octane trminal 
Php :: rest api php 
Php :: laravel reoute return string 
Php :: laravel get data from model to controller 
Php :: bootstrap autocomplete example laravel 
Php :: laravel collection flatMap 
Php :: get product price by id woocommerce snippet 
Php :: create model and migration laravel 
Php :: woocommerce_product_is_on_sale filter 
Php :: php division 
Php :: change laravel port 
Php :: send data with url in php 
Php :: php get parent url from script location 
Php :: hasmany relationship in laravel 
Php :: laravel group concat values showing duplicate 
Php :: php explode and get first value 
Php :: group by count mongodb laravel 
Php :: laravel make job command 
Php :: laravel get url parameters in controller 
Php :: php 8 loadmodule 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =