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

    How to use login throttle in laravel 5?

    How to use login throttle in laravel 5?

    Open Post

    How to connect mysql database in node js with example?

    How to connect mysql database in node js with example?

    Open Post

    Laravel 5 - Image Gallery CRUD example from scratch

    Laravel 5 - Image Gallery CRUD example from scratch

    Open Post

    Laravel Jquery Ajax Pagination Example From Scratch

    Laravel Jquery Ajax Pagination Example From Scratch

    Open Post

    Laravel 5 - How to prevent browser back button after user logout?

    Laravel 5 - How to prevent browser back button after user logout?

    Open Post

    How to create custom facade in laravel 5.2?

    How to create custom facade in laravel 5.2?

    Open Post