Counting Files in a Directory
To find the count of number of files in a directory, use this.
Copy this code and paste it in your HTML
<?php
$dir_path = "wp-content/uploads/media/";
$wcount = count(glob("" .$dir_path. "*.jpg")); ?>
Report this snippet
Comments
Subscribe to comments