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

    Laravel - How to make subquery in select statement?

    Laravel - How to make subquery in select statement?

    Open Post

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Laravel 5.3 - How to create SEO friendly sluggable URL

    Open Post

    PHP - multiple file uploading dropzone js example

    PHP - multiple file uploading dropzone js example

    Open Post

    PHP Script - Login with Facebook using facebook-php-sdk and MySQL example with demo

    PHP Script - Login with Facebook using facebook-php-sdk and MySQL example with demo

    Open Post

    How to get location information from ip address in Laravel ?

    How to get location information from ip address in Laravel ?

    Open Post

    Laravel 5 Facebook authentication using Socialite Package

    Laravel 5 Facebook authentication using Socialite Package

    Open Post