Jump to content

[SOLVED] scandir() results


aeonsky

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/83922-solved-scandir-results/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.