I\'d like to count the number of files in a folder and return that number to set a variable in a .js file.
Essentially, I have X number of images in a folder. When t
I would do it like this
echo count(glob("{$_GET['dir']}/*.*"));