holowugz Posted March 24, 2006 Share Posted March 24, 2006 Ok i need be able to echo the filenames and sizes of all files that end in .ctt and are in a specific directory, the directory will always be named the current date (GMT)now this doesnt work and i am not sure why<?php$dir = gmdate('d-m-Y');foreach(glob("$dir/*.ctt") as $filename) { echo "$filename size " . filesize($filename) . "\n";}?> Quote Link to comment https://forums.phpfreaks.com/topic/5710-glob-problem/ Share on other sites More sharing options...
holowugz Posted March 24, 2006 Author Share Posted March 24, 2006 $dir = gmdate('d-m-Y');$arrayFiles= glob("$dir/*.ctt");if($arrayFiles){ foreach ($arrayFiles as $filename) { echo "$filename size <br>"; }}else{echo "No files";}Fixed it, it works now lol ty Quote Link to comment https://forums.phpfreaks.com/topic/5710-glob-problem/#findComment-20369 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.