Tag : glob


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

    How to get current month records in Laravel 5?

    How to get current month records in Laravel 5?

    Open Post

    Laravel 5 - Multiple markers in google map using gmaps.js

    Laravel 5 - Multiple markers in google map using gmaps.js

    Open Post

    How to check current password using hash check in Laravel 5.3?

    How to check current password using hash check in Laravel 5.3?

    Open Post

    PHP - Behance API tutorial with example and demo

    PHP - Behance API tutorial with example and demo

    Open Post

    Mailgun setup with Laravel 5 example

    Mailgun setup with Laravel 5 example

    Open Post

    How to create middleware for XSS protection in laravel 5?

    How to create middleware for XSS protection in laravel 5?

    Open Post