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

    Laravel 5 import export to excel and csv using maatwebsite example.

    Laravel 5 import export to excel and csv using maatwebsite 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

    Laravel 5 - How to get difference of time in minutes?

    Laravel 5 - How to get difference of time in minutes?

    Open Post

    Laravel 5 mailchimp api integration from scratch with example

    Laravel 5 mailchimp api integration from scratch with example

    Open Post

    Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

    Laravel 5 - Multiple Images Uploading using dropzone.js example with demo

    Open Post

    Laravel 5 generate sitemap using roumen/sitemap package Example

    Laravel 5 generate sitemap using roumen/sitemap package Example

    Open Post