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 | | 2255 Viewer | Category : PHP
READ MORE

    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 Autocomplete using Bootstrap Typeahead JS Example with Demo

    Laravel 5 Autocomplete using Bootstrap Typeahead JS Example with Demo

    Open Post

    AngularJS - scroll to a specific element using anchorscroll

    AngularJS - scroll to a specific element using anchorscroll

    Open Post

    Laravel 5.4 New Feature - Add new Components & Slots in Blade Template

    Laravel 5.4 New Feature - Add new Components & Slots in Blade Template

    Open Post

    How to add charts in Laravel 5 using Highcharts ?

    How to add charts in Laravel 5 using Highcharts ?

    Open Post

    Laravel 5 - Ajax crop image before upload using using croppie plugin

    Laravel 5 - Ajax crop image before upload using using croppie plugin

    Open Post