So I am trying to build a script that scans a directory and returns random images to be used as backgrounds.
The php looks like this:
$dir = \"views
Why not use regex? That way it captures any amount of periods. (i.e. ".", "..", "..." etc..)
while (false !== ($filename = readdir($dh))) { if(!preg_match('/^\.*$/',$filename)){ $files[] = $filename; }