You can simply do the following :
$fi = new FilesystemIterator(__DIR__, FilesystemIterator::SKIP_DOTS); printf("There were %d Files", iterator_count($fi));
Related Posts:
- How to force file download with PHP
- How to copy a file from one directory to another using PHP?
- Create a folder if it doesn’t already exist
- select count(*) from table of mysql in php
- Array to String PHP?
- Should I use mysqli_real_escape string() or mysql_real_escape_string() for form data?
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- PHP – Move a file into a different folder on the server
- What are the main differences between PHPExcel and PhpSpreadsheet?
- PDOException: SQLSTATE[HY000] [2002] No such file or directory
- How do I get a file extension in PHP?
- mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in
- Convert a PHP object to an associative array
- How to rename a directory/folder on GitHub website?
- How to parse a CSV file using PHP
- Download a single folder or directory from a GitHub repo
- Cannot use object of type stdClass as array?
- Is a new line = \n OR \r\n?
- Email Not Sending from Byethost Hosting
- Illegal string offset Warning PHP
- Can curl make a connection to any TCP ports, not just HTTP/HTTPS?
- mysqli_real_connect(): (HY000/2002): No such file or directory
- Deleting an element from an array in PHP
- Converting string to Date and DateTime
- Error 330 (net::ERR_CONTENT_DECODING_FAILED):
- What does __FILE__ mean?
- How can I do ‘insert if not exists’ in MySQL?
- The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500
- What is the difference between the ‘www’ folder and ‘htdocs’ folder?
- Notice: Trying to get property of non-object error
- undefined offset PHP error
- Call to undefined function mysql_query() with Login
- What is Options +FollowSymLinks?
- Call to undefined method mysqli_stmt::get_result
- How to reformat date in PHP?
- PHP convert XML to JSON
- Cannot simply use PostgreSQL table name (“relation does not exist”)
- How do I expire a PHP session after 30 minutes?
- In_array not working
- How to make a countdown using PHP
- PHP if not statements
- Package php5 have no installation candidate (Ubuntu 16.04)
- How can I do ‘insert if not exists’ in MySQL?
- Fatal error: Cannot use object of type mysqli_result
- mysql_field_name to the new mysqli
- mysqli_select_db() expects parameter 1 to be mysqli, string given
- PHP mail function doesn’t complete sending of e-mail
- Remove all special characters from a string
- Convert php array to Javascript
- how to convert object into string in php
- PHP Fatal error: Call to undefined function mssql_connect()
- phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user ‘pma’@’localhost’ (using password: NO)
- Call to a member function on null?
- how to ping ip addresses in php and give results
- do_shortcode not working
- SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 102
- Only variable references should be returned by reference – Codeigniter
- PHP Unset Session Variable
- “Fatal error: Cannot redeclare function”
- php get all url variables
- How to remove unused dependencies from composer?
- how to get date of yesterday using php?
- How can I fetch all items from a DynamoDB table without specifying the primary key?
- ERROR: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it
- How to extract and access data from JSON with PHP?
- How to convert array to SimpleXML
- What does double question mark (??) operator mean in PHP
- How can I find the php.ini file used by the command line?
- WordPress query single post by slug
- TCPDF ERROR: Some data has already been output, can’t send PDF file
- Check if a PHP cookie exists and if not set its value
- Limit String Length
- How to run PHP locally on MacOS
- Call PHP function from jQuery?
- PhpMailer SMTP NOTICE: EOF caught while checking if connected
- What is the meaning of sprintf(): Too few arguments
- How to use $_SERVER[‘HTTP_REFERER’] correctly in php?
- what is $_SERVER[‘QUERY_STRING’] ? how it works?
- PHP Error : Fatal error: Constant expression contains invalid operations
- JavaScript equivalent of PHP’s in_array()
- Paypal IPN Verification Postback with HTTPS
- Implement linked list in php
- Using PHP 7 with WAMP
- Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given… what I do wrong?
- PHP: bootstrap.php
- Display array values in PHP
- Php create a file if not exists
- Page redirect after certain time PHP
- Check if $_POST exists
- PHP – Fatal error: Unsupported operand types
- Specific Loop For 2 Within Each
- What’s the proper way to use wp_enqueue_script/style?
- Count number of published posts by type
- Counting number of posts in multiple (sub)categories using shortcode
- Like and Dislike Buttons on Post with Counter – Only allow one click per post per user session
- Autoloading Classes in Plugins
- How to get the total count of Favorite/Favorited authors
- number of posts with “Load More”
- Get the total Author Favorited posts
- How do I prevent a folder from reappearing in my home directory?