aeonsky Posted January 1, 2008 Share Posted January 1, 2008 First, I wanna thank you guys for helping me, you've been a great help in the past. I use scandir() to see the contents of a directory with this script: $dir = 'test/'; $files1 = scandir($dir); print_r($files1); Which outputs: Array ( [0] => . [1] => .. [2] => Baseball [3] => Football ) I'm writing a script which will depend on the contents of the folder. And my question is, will the first and the second section of the array [0] => . [1] => .. always contain "." and ".." under any circumstance? Thanks a bunch guys! Quote Link to comment https://forums.phpfreaks.com/topic/83922-solved-scandir-results/ Share on other sites More sharing options...
AndyB Posted January 1, 2008 Share Posted January 1, 2008 yes, and glob() might suit you better - http://ca.php.net/manual/en/function.glob.php Quote Link to comment https://forums.phpfreaks.com/topic/83922-solved-scandir-results/#findComment-427088 Share on other sites More sharing options...
aeonsky Posted January 1, 2008 Author Share Posted January 1, 2008 Always it is, thank you! Quote Link to comment https://forums.phpfreaks.com/topic/83922-solved-scandir-results/#findComment-427089 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.