Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php

//how to count directory file and echo

$directory = "/path/to/dir/";
$filecount = count(glob($directory . "*"));
echo "There were $filecount files";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
8+5 =