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

    How to create custom helper in Laravel 5?

    How to create custom helper in Laravel 5?

    Open Post

    Laravel 5 - Authenticate user in NodeJS with socket io using JWT.

    Laravel 5 - Authenticate user in NodeJS with socket io using JWT.

    Open Post

    How to send mail using mailable in laravel 5.3?

    How to send mail using mailable in laravel 5.3?

    Open Post

    Laravel 5 - Google reCaptcha code and Validation example using anhskohbo/no-captcha package

    Laravel 5 - Google reCaptcha code and Validation example using anhskohbo/no-captcha package

    Open Post

    How to execute artisan commands from route or controller in Laravel ?

    How to execute artisan commands from route or controller in Laravel ?

    Open Post

    jQuery Ajax X-editable bootstrap plugin to update records in PHP Example

    jQuery Ajax X-editable bootstrap plugin to update records in PHP Example

    Open Post