Tag : Count



How to count number of files in directory PHP?

If you are working on code php and you require to count number of files, images, zip file, rar files, etc in the given folder path, then you can count using glob() and count() of php. So, let's see this bellow example and learn how it done. <strong class="example"></strong> <pre class="prettyprint lang-php"> $folderPath = "upload/"; $countFile = 0; $totalFiles = glob($folderPath . "*"); if ($totalFiles){ $countFile = count($totalFiles); } print_r($countFile); </pre>

By Hardik Savani | March 14, 2016 | | 3506 Viewer | Category : PHP
READ MORE

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    Laravel 5 - Barcode generator example using milon/barcode package

    Laravel 5 - Barcode generator example using milon/barcode package

    Open Post

    How to add CKEditor with image upload using KCFinder in PHP Example Code?

    How to add CKEditor with image upload using KCFinder in PHP Example Code?

    Open Post

    Laravel 5 - Implement Flash Messages with example

    Laravel 5 - Implement Flash Messages with example

    Open Post

    Laravel - Dynamically Add or Remove input fields using JQuery

    Laravel - Dynamically Add or Remove input fields using JQuery

    Open Post

    Laravel 5 - Create Dummy Data using tinker factory

    Laravel 5 - Create Dummy Data using tinker factory

    Open Post