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

    AngularJS - convert comma separated string to array example

    AngularJS - convert comma separated string to array example

    Open Post

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Laravel 5.3 - whereDate(), whereMonth(), whereDay() and whereYear() examples.

    Open Post

    PHP - Input multiple tags with dynamic autocomplete example

    PHP - Input multiple tags with dynamic autocomplete example

    Open Post

    AngularJS - scroll to a specific element using anchorscroll

    AngularJS - scroll to a specific element using anchorscroll

    Open Post

    Jquery highlight search text in div using highlight JS with example

    Jquery highlight search text in div using highlight JS with example

    Open Post

    Laravel 5.2 and AngularJS CRUD with Search and Pagination Example.

    Laravel 5.2 and AngularJS CRUD with Search and Pagination Example.

    Open Post