php - readdir() reads nonexistent files "." and ".." -


i'm basic php programmer, simple website users , profile pictures.

there folder called ppic (profile pictures).

when use readdir() says on php.net site, prints out 2 nonexistent files.

if put echo "there match - $entry<br>; inside while loop $entry being file name, prints out:

there match - . there match - .. there match - autumn leaves.jpg there match - creek.jpg there match - toco toucan.jpg 

i have 3 files in folder: "autumn leaves.jpg", "creek.jpg", , "toco toucan.jpg".

i'm not great computers, have no idea dots mean.

can please explain these me?

learn unix basics: (and other common filesystem handlings)

the . virtual symbolic link current folder (e.g. ./creek.jpg is, resolved, same creek.jpg)

the .. virtual symbolic link parent folder.

to hide them, manually exclude via $file !== '.' && $file !== '..'.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -