Posted By

taqin on 10/07/11


php wordpress

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Counting Files in a Directory

 / Published in: PHP

To find the count of number of files in a directory, use this.

  1. <?php
  2. $dir_path = "wp-content/uploads/media/";
  3. $wcount = count(glob("" .$dir_path. "*.jpg"));
  4. ?>

Report this snippet  

You need to login to post a comment.